Advertisement
asyscom

Untitled

Jan 17th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.49 KB | None | 0 0
  1. - alias: Accensione/Spegnimento luce con apertura porta
  2.   trigger:
  3.   - platform: state
  4.     entity_id: binary_sensor.door_window_sensor_158d00023ea03f
  5.     to: 'on'
  6.   - platform: state
  7.     entity_id: binary_sensor.door_window_sensor_158d00023ea03f
  8.     to: 'off'
  9.   action:
  10.     service_template: '{% if trigger.to_state.state == "on" %} homeassistant.turn_on
  11.       {% elif trigger.to_state.state == "off" %} homeassistant.turn_off {% endif %}'  
  12.     entity_id: light.gateway_light_7811dce210d1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement