微信扫码登录
5
52
311
论坛分享达人
#夜灯联动 #当面板开关状态为 on 时 设置夜灯状态为 on - alias: 'onoff' trigger: platform: state entity_id: switch.wall_switch_right_158d00012f7c to: 'on' condition: action: - service: light.turn_on entity_id: light.gateway_light_34ce008bf8 #当夜灯状态为 on 时 设置开关状态为 on - alias: 'lonoff' trigger: platform: state entity_id: light.gateway_light_34ce008bf8 to: 'on' condition: action: - service: switch.turn_on entity_id: switch.wall_switch_right_158d00012f7c #当面板开关状态为 off 时 设置夜灯状态为 off - alias: 'offon' trigger: platform: state entity_id: switch.wall_switch_right_158d00012f7c to: 'off' condition: action: - service: light.turn_off entity_id: light.gateway_light_34ce008bf8 #当夜灯状态为 off 时 设置开关状态为 off - alias: 'loffon' trigger: platform: state entity_id: light.gateway_light_34ce008bf8 to: 'off' condition: action: - service: switch.turn_off entity_id: switch.wall_switch_right_158d00012f7c #夜灯联动
使用道具 举报
18
125
2639
金牌会员
- alias: 'onoff' trigger: platform: state entity_id: switch.wall_switch_right_158d00012f7c action: service_template: > {% if is_state("switch.wall_switch_right_158d00012f7c", "on") %} light.turn_on {% elif is_state("switch.wall_switch_right_158d00012f7c", "off") %} light.turn_off {% endif %} entity_id: light.gateway_light_34ce008bf8
本版积分规则 发表回复 回帖后跳转到最后一页
在众坛友心目中具有较高技术与威望,为社区繁荣作出重要贡献
Archiver|手机版|小黑屋|Hassbian ( 晋ICP备17001384号-1 )
GMT+8, 2025-7-21 05:30 , Processed in 0.202196 second(s), 7 queries , MemCached On.
Powered by Discuz! X3.5
© 2001-2025 Discuz! Team.