-
-
Save blizzrdof77/1f8d81cc68e93264aac1b3e8c9df936b to your computer and use it in GitHub Desktop.
Automatic light or switch turn off after time
This file contains hidden or 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: Automatic light or switch turn off after timeout | |
description: > | |
Given a switchable entity, when it is turned on, it will automatically turn off after a set timeout period off after a certain period of time. | |
Based on: | |
- [Turn Off Light After Time](https://gist.github.com/JonTheNiceGuy/5ac636739165dd593030c0fed16eb618) by [JonTheNiceGuy](https://gist.github.com/JonTheNiceGuy) | |
- [Automatic light or switch turn off after time](https://gist.github.com/tdiekel/88ac0967cf6d3002aa91e65e3768eb45) by [tdiekel](https://gist.github.com/tdiekel) | |
domain: automation | |
input: | |
entity: | |
name: Target Entity | |
description: Select the light or switchable entity to monitor. | |
selector: | |
entity: | |
domain: | |
- light | |
- switch | |
- fan | |
- input_boolean | |
- siren | |
- group | |
- media_player | |
- remote | |
time: | |
name: Duration | |
description: The duration for which to leave the device/entity on before turning it off. | |
selector: | |
duration: | |
trigger: | |
- platform: state | |
entity_id: !input entity | |
to: 'on' | |
for: !input time | |
mode: single | |
condition: [] | |
action: | |
- service: homeassistant.turn_off | |
data: {} | |
entity_id: !input entity |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Added additional entity domains to list of allowed domains (all "switchable" domain types).