I feel like i am just not wording this properly and so my searches have come up empty handed. I am trying to create the option for my kid, so that he can turn on his morning routine on his own. The issue is, he is a child and he will push the button over and over and over again. So i would like it to be able to be pushed once.. and then disabled until night time (or whenever)
I just can't figure out the logic i need to implement it. If anyone needs to know the whole process its as follows.
Zigbee button gets pushed
Triggers virtual button in google home
That triggers routine in google home to begin
Zigbee button shall be pushed again or mommy and daddy will go crazy<--- this part
How do you get from Zigbee button to virtual button which goes to google home? Do you already have something in Rule Machine?
I would maybe just setup a local variable on the rule. When the button is pressed set a timestamp to the variable. Then you could add as the first thing in the rule to check if the button was already pushed in last X hours and bail out if needed.
There are lots of ways to do it, @fieldsjm has mentioned another one which would use two rules. The second rule would reset the variable at whatever time you want so the button can be used again.
It's actually a virtual switch in google home. You can't import a virtual button for some dumb reason. But i do have the switch to auto turn off state after 1 second, to act like a button. If you are asking how i did it, you have to add the virtual device to your hubitat list, and then in the hubitat google home app you import it. Then on the android google home app, you pair with hubitat and then you can see it and use it as a trigger.
Thanks for both options, i will look into those. They seem somewhat simple and complicated at the same time but i am willing to play around with it.