ylilike 发表于 2023-7-31 20:54:57

fxone 发表于 2023-7-28 10:44
大佬 你的代码我没组装起来,太菜了。能用文本分享个完整的吗?   买个两个X12眼瞅着要落灰了 ...

用上面一段就行,我复制的就是源码呀

ylilike 发表于 2023-7-31 20:58:48

Lee4242 发表于 2023-7-30 19:35
id(ctrl_text).publish_state("若然,一切若然~");
请问这段代码有什么用处?

显示个名而已,呵呵
你也可灵活运用,传参数给esphome

putao 发表于 2023-8-9 12:53:27

留存了,谢谢分享,家里1个现在和苗都登不上了,等有空试下

chieng 发表于 2023-8-9 21:43:44

学习,谢谢分 享

woshidnashq 发表于 2023-8-11 05:45:49

大佬 是不是直接用第一段代码就行了,不用二楼的代码了吧
我用一楼代码现在问题是这样的
Couldn't find ID 'ctrl_text'. Please check you have defined an ID with that name in your configuration.
Couldn't find ID 'led_switch'. Please check you have defined an ID with that name in your configuration.
      lambda: !lambda |-
          id(Voltage).publish_state(id(y_voltage).state + 116.3);
          id(Amperage).publish_state(id(Wattage).state / (id(y_voltage).state + 116.3) );
          if( id(Wattage).state > 3){
            id(Power).publish_state(true);
            if(id(led_switch).state){
            id(led).turn_on();
            }
          }else{
            id(Power).publish_state(false);
            id(led).turn_off();
          }
Couldn't find ID 'led'. Please check you have defined an ID with that name in your configuration.
请问该如何操作呀,搞了两天了,现在就是这里弄不好

ylilike 发表于 2023-8-12 22:55:19

woshidnashq 发表于 2023-8-11 05:45
大佬 是不是直接用第一段代码就行了,不用二楼的代码了吧
我用一楼代码现在问题是这样的
Couldn't find ID...

这个我编译通过了,你试试

cdl511 发表于 2023-8-13 08:41:15

谢谢楼主分享有用的:D

ruike007 发表于 2023-8-17 10:04:37

再次感谢楼主大佬的分享

yefeng11 发表于 2023-8-21 15:29:19

感谢分享

fenixdeng 发表于 2023-8-26 11:03:29

46楼编译不成功

INFO Reading configuration /config/esphome/jtest.yaml...
WARNING GPIO4 is a Strapping PIN and should be avoided.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
WARNING GPIO0 is a Strapping PIN and should be avoided.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
WARNING GPIO2 is a Strapping PIN and should be avoided.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
INFO Generating C++ source...
INFO Core config or version changed, cleaning build files...
INFO Compiling app...
Processing justest (board: esp32dev; framework: arduino; platform: platformio/espressif32 @ 5.3.0)
--------------------------------------------------------------------------------
Error! Failed to extract upstream toolchainconfigurations:
Bad package version `1.22.0-97-gc752ad5-5.2.0`
You can disable this feature via the `board_build.arduino.upstream_packages = no` setting in your `platformio.ini` file.


另外想请问大佬,X12不是esp8266芯片吗?用esp32的esphome Platform也可以?
页: 1 2 3 4 [5] 6 7 8
查看完整版本: 某动X12空调伴侣esphome固件分享 2023.6.24 更新功率部分