Skip to content

Instantly share code, notes, and snippets.

@Didgeridrew
Created November 30, 2022 11:32
Show Gist options
  • Select an option

  • Save Didgeridrew/25ae3c02863a0b45984771d10182703a to your computer and use it in GitHub Desktop.

Select an option

Save Didgeridrew/25ae3c02863a0b45984771d10182703a to your computer and use it in GitHub Desktop.
HA - Basic Light with timer to turn it off
alias: Lights - GE RF Pucks + Time
description: ""
trigger:
- platform: event
id: timer
event_type: timer.finished
event_data:
entity_id: timer.ge_puck_light_timer
- platform: state
entity_id: light.ge_rf_puck_lights
to: "on"
id: light_on
- platform: state
entity_id: light.ge_rf_puck_lights
to: "off"
id: light_off
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: light_on
sequence:
- service: timer.start
target:
entity_id: timer.ge_puck_light_timer
data: {}
- conditions:
- condition: trigger
id: light_off
sequence:
- service: timer.cancel
target:
entity_id: timer.ge_puck_light_timer
data: {}
- conditions:
- condition: trigger
id: timer
sequence:
- service: light.turn_off
target:
entity_id: light.ge_rf_puck_lights
data: {}
mode: queued
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment