Howdy! Totally new to Hubitat and home automation so this is probably very simple for most but I can't figure it out.
I want music to play while I use the restroom. I have a rule machine rule set up with my motion sensor as the trigger and "Play Track" as the action. This works perfectly so far!
The problem is that every time I move the action re-triggers and starts the song over. I need to add a delay or pause or something so the action wont trigger again for at least 5 minutes.
Any help is appreciated!
Private Boolean should work in a case like this.
Something like this:
When the rule is triggered, it sets its own private Boolean to false, and also sets it to true with a five minute delay. That means even if the motion sensor triggers again, the rule won’t run til at least five minutes have elapsed.
2 Likes
Another alternative would be to add a “Required Expression” in Rule Machine that checks to ensure that the music is not playing. Something like:
You’ll find that there are typically many ways to do the same thing - the important thing is that you find one that works!
Welcome to Hubitat!
3 Likes
Perfect!
Worked like a charm!
Thanks a bunch for the help. Excited to set up a bunch more automations.
4 Likes