Advertisement
Guest User

Untitled

a guest
Nov 16th, 2018
300
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.84 KB | None | 0 0
  1. - alias: tv_area_motion
  2.   trigger:
  3.     - platform: state
  4.       entity_id: binary_sensor.stairs_sensor
  5.       to: 'on'
  6.     - platform: state
  7.       entity_id: binary_sensor.stairs_sensor
  8.       to: 'off'
  9.       for:
  10.         seconds: 60
  11.     - platform: state
  12.       # entity_id: !secret binary_sensor_tv_area_motion
  13.       entity_id: binary_sensor.motion_sensor_158d000123291f
  14.       to: 'on'
  15.     - platform: state
  16.       # entity_id: !secret binary_sensor_tv_area_motion
  17.       entity_id: binary_sensor.motion_sensor_158d000123291f
  18.       to: 'off'
  19.       for:
  20.         seconds: 60
  21.     - platform: state
  22.       entity_id: !secret binary_sensor_spare_bedroom_door
  23.       to: 'on'
  24.   action:
  25.     - service: script.light_control
  26.       data_template:
  27.         entity_id: light.tv_area_lamp
  28.         state: "{{ trigger.to_state.state }}"
  29.         brightness: 30
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement