32
113
545
高级会员
switch: - platform: gpio pin: GPIO5 name: "继电器开关" device_class: motion id: motion #触发时打开GPIO5输出,点亮了板载LED on_turn_on: - switch.turn_on: led2 #恢复时关闭GPIO5输出,熄灭了板载 LED on_turn_off: - switch.turn_off: led2 - platform: gpio pin: GPIO2 # inverted: true name: "继电器LED" id: led2
使用道具 举报
9
159
1720
金牌会员
0
77
751
14
418
2774
本版积分规则 发表回复 回帖后跳转到最后一页
Archiver|手机版|小黑屋|Hassbian ( 晋ICP备17001384号-1 )
GMT+8, 2025-5-18 09:25 , Processed in 0.065289 second(s), 26 queries .
Powered by Discuz! X3.5
© 2001-2025 Discuz! Team.