16587| 11
|
[求助] 请大神们帮忙写一个开关的自动化 |
悬赏5金钱已解决
最佳答案[pre]- alias: switch sync
initial_state: false
trigger:
platform: state
entity_id: switch.xxx, switch.yyy
action:
service_template: >
{% if trigger.to_state.state == 'on' %}
switch.turn_off
{% else %}
switch.turn_on
{% endif %}
data_template:
entity_id: >
{% if trigger.entity_id == 'switch.xxx' %}
switch.yyy
{% ...
| ||
| ||
评分 | ||
|
||
| ||
所有过往,皆为序章。
|
||
| ||
| ||
| ||
| ||
| ||
| ||
Archiver|手机版|小黑屋|Hassbian ( 晋ICP备17001384号-1 )
GMT+8, 2025-6-28 11:55 , Processed in 1.614788 second(s), 25 queries .
Powered by Discuz! X3.5
© 2001-2025 Discuz! Team.