找回密码
 立即注册
楼主: ylilike

[经验分享] 某动X12空调伴侣esphome固件分享 2023.6.24 更新功率部分

  [复制链接]

14

主题

418

回帖

2770

积分

金牌会员

积分
2770
金钱
2338
HASS币
0
 楼主| 发表于 2023-7-31 20:54:57 | 显示全部楼层
fxone 发表于 2023-7-28 10:44
大佬 你的代码我没组装起来,太菜了。  能用文本分享个完整的吗  ?   买个两个X12  眼瞅着要落灰了 ...

用上面一段就行,我复制的就是源码呀
若然,一切若然~
回复

使用道具 举报

14

主题

418

回帖

2770

积分

金牌会员

积分
2770
金钱
2338
HASS币
0
 楼主| 发表于 2023-7-31 20:58:48 | 显示全部楼层
Lee4242 发表于 2023-7-30 19:35
id(ctrl_text).publish_state("若然,一切若然~");
请问这段代码有什么用处?

显示个名而已,呵呵
你也可灵活运用,传参数给esphome
若然,一切若然~
回复

使用道具 举报

1

主题

26

回帖

80

积分

注册会员

积分
80
金钱
53
HASS币
0
发表于 2023-8-9 12:53:27 | 显示全部楼层
留存了,谢谢分享,家里1个现在和苗都登不上了,等有空试下
回复

使用道具 举报

3

主题

15

回帖

62

积分

注册会员

积分
62
金钱
44
HASS币
0
发表于 2023-8-9 21:43:44 | 显示全部楼层
学习,谢谢分 享
回复

使用道具 举报

3

主题

9

回帖

222

积分

中级会员

积分
222
金钱
210
HASS币
0
发表于 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();
          } [source /config/esphome/444.yaml:131]
Couldn't find ID 'led'. Please check you have defined an ID with that name in your configuration.
请问该如何操作呀,搞了两天了,现在就是这里弄不好
回复

使用道具 举报

14

主题

418

回帖

2770

积分

金牌会员

积分
2770
金钱
2338
HASS币
0
 楼主| 发表于 2023-8-12 22:55:19 | 显示全部楼层
woshidnashq 发表于 2023-8-11 05:45
大佬 是不是直接用第一段代码就行了,不用二楼的代码了吧
我用一楼代码现在问题是这样的
Couldn't find ID  ...

这个我编译通过了,你试试 x12_remote_1.zip (3.22 KB, 下载次数: 111)

若然,一切若然~
回复

使用道具 举报

0

主题

48

回帖

1086

积分

金牌会员

积分
1086
金钱
1038
HASS币
0
发表于 2023-8-13 08:41:15 | 显示全部楼层
谢谢楼主分享有用的
回复

使用道具 举报

5

主题

103

回帖

871

积分

高级会员

积分
871
金钱
763
HASS币
0
发表于 2023-8-17 10:04:37 | 显示全部楼层
再次感谢楼主大佬的分享
回复

使用道具 举报

0

主题

4

回帖

28

积分

新手上路

积分
28
金钱
24
HASS币
0
发表于 2023-8-21 15:29:19 | 显示全部楼层
感谢分享
回复

使用道具 举报

0

主题

30

回帖

546

积分

高级会员

积分
546
金钱
516
HASS币
0
发表于 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.ht ... bout-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.ht ... bout-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.ht ... bout-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也可以?
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2025-5-1 09:34 , Processed in 0.264196 second(s), 24 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表