14364| 11
|
[求助] 请大神们帮忙写一个开关的自动化 |
5金钱
最佳答案- 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
{% else ...
| ||
发表于 2018-1-19 19:35:35
|
显示全部楼层
| ||
发表于 2018-1-19 20:07:51
|
显示全部楼层
评分 | ||
发表于 2018-1-19 20:18:33
|
显示全部楼层
| ||
所有过往,皆为序章。
|
||
| ||
发表于 2018-1-19 23:02:13
|
显示全部楼层
| ||
发表于 2018-1-20 00:27:59
|
显示全部楼层
| ||
发表于 2018-1-20 00:37:51
|
显示全部楼层
| ||
发表于 2018-1-20 00:39:35
|
显示全部楼层
| ||
发表于 2018-1-29 17:09:24
|
显示全部楼层
| ||
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.