This might be a stupid question, but I’ve set up an input boolean which I can toggle on/off from my Lovelace dashboard. When this input boolean is switched on, I want a given switch entity to toggle on/off with a delay until I the input boolean is turned off. I’ve tried creating a script with a delay and a repeat with a condition, and I have an automation which runs this script when the input boolean is set to on, but this does not work as expected, not sure what’s going on.
Can anyone provide a script/automation yaml which does this?