Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - id: '1537395875115'
- alias: Toggle Bedroom Lamp
- trigger:
- - entity_id: binary_sensor.bedroom_lamp_switch
- from: 'on'
- platform: state
- to: 'off'
- condition: []
- action:
- - data:
- entity_id: light.bedroom_lamp_2
- service: light.toggle
- - id: '1537675143735'
- alias: Turn on Bedroom Lights to 100%
- trigger:
- - entity_id: binary_sensor.bedroom_light_switch
- from: 'on'
- platform: state
- to: 'off'
- condition:
- - below: '255'
- condition: numeric_state
- entity_id: light.bedroom_lights
- value_template: '{{ states.light.bedroom_lights.attributes.brightness }}'
- - condition: state
- entity_id: light.bedroom_lights
- state: 'on'
- action:
- - data:
- brightness_pct: '100'
- entity_id: light.bedroom_lights
- service: light.turn_on
- - id: '1537675143737'
- alias: Turn off Bedroom Lights if at 100%
- trigger:
- - entity_id: binary_sensor.bedroom_light_switch
- from: 'on'
- platform: state
- to: 'off'
- condition:
- - above: '253'
- condition: numeric_state
- entity_id: light.bedroom_lights
- value_template: '{{ states.light.bedroom_lights.attributes.brightness }}'
- - condition: state
- entity_id: light.bedroom_lights
- state: 'on'
- action:
- - data:
- entity_id: light.bedroom_lights
- service: light.turn_off
- - id: '1537675143738'
- alias: Turn On Bedroom Lights if off
- trigger:
- - entity_id: binary_sensor.bedroom_light_switch
- from: 'on'
- platform: state
- to: 'off'
- condition:
- - condition: state
- entity_id: light.bedroom_lights
- state: 'off'
- action:
- - data:
- entity_id: light.bedroom_lights
- service: light.turn_on
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement