本帖最后由 ABC 于 2017-9-29 16:25 编辑
- 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
|