『瀚思彼岸』» 智能家居技术论坛
标题:
esphome api连接不上,求助!
[打印本页]
作者:
taida
时间:
2022-10-12 19:41
标题:
esphome api连接不上,求助!
跟着论坛代码(
https://bbs.hassbian.com/thread-6888-1-1.html
)做了一个远程开关,但是api连接不上,各位大佬,有空帮忙看看,谢谢!
登录/注册后可看大图
binary_sensor
:
-
platform
:
homeassistant
id
:
fukaiguan
name
:
"fukaiguan"
entity_id
:
switch.ci_wo_tong_deng
on_state
:
-
if
:
condition
:
binary_sensor.is_on
:
fukaiguan
then
:
-
switch.turn_on
:
relay1
-
logger.log
:
"fukaiguan is on!"
else
:
-
switch.turn_off
:
relay1
-
logger.log
:
"fukaiguan is off!"
-
platform
:
gpio
id
:
button_1
pin
:
number
:
RX
#接RX GPIO3脚和gnd线与翘板开关相连
inverted
:
True
mode
:
INPUT_PULLUP
filters
:
-
delayed_on_off
:
100ms
on_state
:
then
:
-
switch.toggle
:
id
:
relay1
switch
:
-
platform
:
gpio
name
:
"test-fuchufangdeng_sw1"
pin
:
0
id
:
relay1
icon
:
"mdi:ceiling-light"
on_turn_on
:
-
homeassistant.service
:
service
:
switch.turn_on
data
:
entity_id
:
switch.ci_wo_tong_deng
on_turn_off
:
-
homeassistant.service
:
service
:
switch.turn_off
data
:
entity_id
:
switch.ci_wo_tong_deng
作者:
taida
时间:
2022-10-12 19:44
标题:
忘记截图了
C:\Users\Admin\Desktop\微信图片_20221012194316.png
欢迎光临 『瀚思彼岸』» 智能家居技术论坛 (https://bbs.hassbian.com/)
Powered by Discuz! X3.5