Solved: AC: Don't turn on if just turned off


I’m looking for how I can avoid mistakenly pressed toggle switch of my AC, I mean if I just turned on the AC and mistakenly pressed it twice, it will turn on the AC and immediately turn it off. Not exactly the best practice for heavy load devices such as AC/Boiler/heater and etc…
Do you know how I can add some “graceful idle timeout” to my switches? Maybe something like climate component has min_cycle_duration



I’d use a condition with a time out when turning it on like:

condition to turn it on would be the switch being off for whatever time you want

You mean to put the condition into the script and then toggle the switch from the script?

I meant for the automation that is triggering the script to add a condition.

Can you show me how you turn the AC on? maybe I am misunderstanding something here

it’s just a basic mqtt switch (from tileboard it toggling it by sending switch.turn_on or switch.turn_off depends on its states)

Ah, my mistake now I get it

You could still create template switch or input boolean that acts like a switch and passes it on to trigger the mqtt switch turn_on/turn_off with the condition as mentioned above (state has to be on/off for xx seconds)

Maybe someone else knows a more elegant way to do it

oh yes, thanks for pointing me on it, i’ve complete forgot about template switch, definitely can use the value_template something like {{as_timestamp(now()) - as_timestamp( > 10}}


Okay that’s definitely smarter than what I thought of at first :smiley: