Last active
January 27, 2021 19:03
-
-
Save PProvost/35ded78f74c31a74419f2aa900bfb7ad to your computer and use it in GitHub Desktop.
A simple timer light blueprint for home assistant
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blueprint: | |
name: Timer Light | |
description: Turn off a light when after a specified amount of time has passed | |
domain: automation | |
source_url: https://gist.github.com/PProvost/35ded78f74c31a74419f2aa900bfb7ad | |
input: | |
light_target: | |
name: Light | |
selector: | |
target: | |
entity: | |
domain: light | |
wait_time: | |
name: Wait time | |
description: Time to wait before turning the light off | |
default: 300 # 5m default | |
selector: | |
number: | |
min: 0 | |
max: 3600 | |
unit_of_measurement: seconds | |
active_start_time: | |
name: Active start time | |
description: "[Optional] Beginning of time period when this is active" | |
default: "00:00:00" | |
selector: | |
time: | |
active_end_time: | |
name: Active end time | |
description: "[Optional] End of time period when this is active" | |
default: "23:59:59" | |
selector: | |
time: | |
mode: restart # If the trigger is detected while running, restart the script. | |
max_exceeded: silent | |
trigger: | |
platform: state | |
entity_id: !input light_target | |
to: "on" | |
for: !input wait_time | |
action: | |
- service: homeassistant.turn_off | |
target: !input light_target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment