Hi,
I’d like to create an automation or script that triggers when I long press an entity on the dashboard that starts a timer of say 2 hours and then turns off the corresponding entity.
Does this need a separate script for each entity or can I get the one script to pass through the entity that was pressed through to the script?
Thanks.
1 Like
Looks like it should be possible with a single script. The script will not get any entity id automatically though, you would have to set it up with an input field that takes an entity id and configure this for each button.
All the usual caveats apply of course. If the timer must survive automation reloads/HASS restarts/etc. you would need separate timer helpers for each button. If that is not important, a delay or wait in the script would be enough.l