Advertisement
Guest User

Untitled

a guest
Nov 12th, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.67 KB | None | 0 0
  1. - id: '1537395875115'
  2.   alias: Toggle Bedroom Lamp
  3.   trigger:
  4.   - entity_id: binary_sensor.bedroom_lamp_switch
  5.     from: 'on'
  6.     platform: state
  7.     to: 'off'
  8.   condition: []
  9.   action:
  10.   - data:
  11.       entity_id: light.bedroom_lamp_2
  12.     service: light.toggle
  13. - id: '1537675143735'
  14.   alias: Turn on Bedroom Lights to 100%
  15.   trigger:
  16.   - entity_id: binary_sensor.bedroom_light_switch
  17.     from: 'on'
  18.     platform: state
  19.     to: 'off'
  20.   condition:
  21.   - below: '255'
  22.     condition: numeric_state
  23.     entity_id: light.bedroom_lights
  24.     value_template: '{{ states.light.bedroom_lights.attributes.brightness }}'
  25.   - condition: state
  26.     entity_id: light.bedroom_lights
  27.     state: 'on'
  28.   action:
  29.   - data:
  30.       brightness_pct: '100'
  31.       entity_id: light.bedroom_lights
  32.     service: light.turn_on
  33.  
  34. - id: '1537675143737'
  35.   alias: Turn off Bedroom Lights if at 100%
  36.   trigger:
  37.   - entity_id: binary_sensor.bedroom_light_switch
  38.     from: 'on'
  39.     platform: state
  40.     to: 'off'
  41.   condition:
  42.   - above: '253'
  43.     condition: numeric_state
  44.     entity_id: light.bedroom_lights
  45.     value_template: '{{ states.light.bedroom_lights.attributes.brightness }}'
  46.   - condition: state
  47.     entity_id: light.bedroom_lights
  48.     state: 'on'
  49.   action:
  50.   - data:
  51.       entity_id: light.bedroom_lights
  52.     service: light.turn_off
  53.  
  54. - id: '1537675143738'
  55.   alias: Turn On Bedroom Lights if off
  56.   trigger:
  57.   - entity_id: binary_sensor.bedroom_light_switch
  58.     from: 'on'
  59.     platform: state
  60.     to: 'off'
  61.   condition:
  62.   - condition: state
  63.     entity_id: light.bedroom_lights
  64.     state: 'off'
  65.   action:
  66.   - data:
  67.       entity_id: light.bedroom_lights
  68.     service: light.turn_on
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement