Last active
September 9, 2024 07:07
-
-
Save JonTheNiceGuy/17fcd695999807a69599249e02ef3f56 to your computer and use it in GitHub Desktop.
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: 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: | |
duration: | |
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
Hey @jeremyjhartley I honestly don't know. I'm sorry to say that I just took some code someone else wrote, and tidied it up and made it reusable. I suspect you probably can just add each of the devices, but if not I don't know how you would change this. I personally run several automations, but that's more because I want to see what's happening, rather than anything more sensible!