Skip to content

Instantly share code, notes, and snippets.

@mrdarrengriffin
Last active January 31, 2020 08:26
Show Gist options
  • Save mrdarrengriffin/5abe5f0741933ea563058aba765daaaa to your computer and use it in GitHub Desktop.
Save mrdarrengriffin/5abe5f0741933ea563058aba765daaaa to your computer and use it in GitHub Desktop.
Example automation of Philips Hue Switch integration
- id: bedroom_brightness_on
alias: Brightness UP - Bedroom Switch
description: 'Brightness UP turns on Bed LEDs and Lamp when bedroom ceiling lights off'
trigger:
- entity_id: sensor.bedroom_switch
platform: state
to: 2_click_up
condition:
- condition: state
entity_id: light.bedroom_ceiling
state: 'off'
action:
- entity_id: light.bed_leds
service: light.turn_on
- entity_id: switch.bedroom_lamp
service: switch.turn_on
- id: bedroom_brightness_off
alias: Brightness DOWN - Bedroom Switch
description: 'Brightness DOWN turns off Bed LEDs and Lamp when bedroom ceiling lights off'
trigger:
- entity_id: sensor.bedroom_switch
platform: state
to: 3_click
- entity_id: sensor.bedroom_switch
platform: state
to: 3_click_up
condition:
- condition: state
entity_id: light.bedroom_ceiling
state: 'off'
action:
- entity_id: light.bed_lights
service: light.turn_off
- entity_id: switch.bedroom_lamp
service: switch.turn_off
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment