Skip to content

Instantly share code, notes, and snippets.

@JonTheNiceGuy
Last active February 19, 2023 13:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JonTheNiceGuy/e0582c3f133c248cf62988193a18533c to your computer and use it in GitHub Desktop.
Save JonTheNiceGuy/e0582c3f133c248cf62988193a18533c to your computer and use it in GitHub Desktop.
Deprecated - uses wrong selector
blueprint:
name: Turn off Switch after Time has elapsed
description: Given a switch entity, watch for it turning on, and then turn it off after a certain period of time.
domain: automation
input:
switch:
name: Switch
description: Select the switch to monitor and control
selector:
entity:
domain: switch
time:
name: Duration
description: The duration to leave the switch on for
selector:
time:
trigger:
- platform: state
entity_id: !input switch
to: 'on'
for: !input time
condition: []
action:
- service: switch.turn_off
data: {}
entity_id: !input switch
mode: single
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment