Preventing device from turning on after turn off

I am having trouble setting a rule to keep a device from being turned back on after it was just turned off. I am using Aeotec smart switches to turn on/off dumb AC's but I want to make sure that when they are turned off they can not be turned back on (for 5 minutes). This is to ensure the compressor does not take any damage when users "toggle" them on/off quickly.
Is there a way to set a rule that prevents basically any action (state change) until a certain amount of time has elapsed?

I do this on a button for my 3-year-old son's bedroom that toggles the light. He will push the button a bunch of times and I don't want light flashing.

image

Thank you so much for the quick reply. I have tried to implement it the same way but when I click the switch the AC turns off and immediately back on. Am I missing something? I am unfamiliar with the Broolean setting and just copied it.

It appears the difference is that Stephen’s bulb is not physically controlled by the button.

Are you trying to suppress physical switching at the Aeotec device itself?

1 Like

No not at the Aeotec device itself but from any other source.
I want to suppress switching the device on (via any switch in hubitat dashboard or button that acts as switch) for a set amount of time.

Basically a rule that says

IF device X is turned off, prevent it from being turned on (via any function / I understand there might be limitations given that someone could physically press the Aeotec button) for X amount of time.

The problem, I think, is that your on/off protection only apples to that rule. If you have a button that causes the switch to be turned on/off via an automation, then that is where the logic needs to be placed.

As for dashboard, I don’t know of a way to do that if you are exposing the switch itself, but you could have a virtual on/off switch that turns the real on/off switch on and off, subject to your 5 minute rule.

All bets are off if someone is controlling it at the physical switch unless the device allows disabling local control. Although, a man can fix anything if he’s got enough duct tape.

That makes a lot of sense. I agree the issue is likely that I am exposing the switch itself.
Great tip on working with a virtual switch! I will try this.

Is there another part of the rule not shown that says:

If private Boolean is false then exit

Otherwise what's to stop this from running on every button press?

I agree .. use a Virtual switch and only use that. Write a rule that is based on the virtual and drive the real switch and then build in the timer logic .... should work a treat

You could also work in a off delay post on ... eg when u turn off , the switch must have been on for 5 minutes for the command is issues

  • u may want to write some rules to keep the virtual and physical switches in sink ... eg on event “physical switch on” turn virtual on ( do not issue command to turn on physical as it is already on ) ... and same again for for == this coiled with the regular on of rule would keep the buttons in sync