Button cool down... how to setup?

Hi guys.
I have a toddler, almost two years old. I setup a light switch in her reach, so she can turn on/off the light by herself. But she's not even two, so she often spams the button a few times... I thought I implement a 5 second cool down for the button... if someone can give me a hint how to do it.

You can do this using a private boolean. Something like this:

IF (Private Boolean is false): Exit Rule
IF [Switch is on] THEN
    Set Private Boolean False
    On: Light
ELSE
    Off: Light
END-IF
Set Private Boolean True --> delayed 0:00:05

I've never used a button, but I imagine it would be something like:

Trigger:

Button is *pushed*

Actions:

IF (Private Boolean is false): Exit Rule
Set Private Boolean False
Toggle: Light
Set Private Boolean True --> delayed 0:00:05
3 Likes

It works as intended and I learned about private boolean variables.

tanks a lot, man

2 Likes

Ha I need this but hadn't asked the question yet. My 2 1/2 year old likes to do same with a Samsung button that I mounted low so he could reach it. However, I have it setup on long press and double tap to do other things so that my wife and i can use it also. It didn't last a day in its position. It looks like i need to follow @aaiyar's suggestion but I don't think 5 seconds is enough; more like 30 seconds to a minute. It looks like one of the Picos I got for Xmas is replacing the standard light switch for my wife & I. Thank you.

I use a simple xiaomi button for the little one. and a full control hue remote for the parents. It works really great that way... she already learned that spamming doesn't work anymore.

1 Like

Ok, here the next challenge with the button (non-Hubitat problem). How do you mount it to the wall so that it won't damage the wall but also doesn't allow my son to yank it down and lose it somewhere that is the mess of his room?

I put it on the door frame with the 3m sticker that came with the button.

1 Like