Automatically turning off a switch after a set time?

Hi Folks.
First thank you all for all the help you have given me.

Does anyone know how you would make a switch automatically flick off after X amount of time when it’s triggered in the HA front end?

Cheers
Jase.

You cannot detect (to my knowledge) if something was turned on via HA or another method, but it is easy to turn something off after it is on for a certain amount of time. See below for an example.

Hey
I just used delay

Note that this will only turn off the switch after 15 minutes if it was turned on via the automation.

If its turned on via the wall switch or the HA front end, the delay won’t work.

1 Like

A nicer way to achieve what you want is to create a proxy switch. You can manually switch this on or off and have it switch off automatically after x minutes with an automation. The regular switch can be synced with the proxy with a second automation.

Hi,
Legend, this is exactly what I was after!!!

Thank you everyone for your help.

Happy days!
Jase.