I am making a rule in rule machine that is to work like this. Between 10 & 11 pm when motion is detected to turn on bathroom lights. This part is not a problem, but I want this rule to only run one time during the 1 hour period.
This is what I have made.
Add a private boolean to your rule and have that be the first action. Doing that would cause your rule to look like:
Required Expression
Mode is Home and Time Between 10-11pm and Private Boolean is True
Trigger
Motion reports active
Actions
Set Private Boolean to False
Turn on Lights
Wait for Event - Specific Time - Time is 11:01pm
Set Private Boolean to True
With the above, this will restrict the rule to running only one time; however, it will reset the Private Boolean after the time window allowing for the rule to be ready for the next day.
That should totally work fine, and I'm not trying to one-up JB10 here or anything like that, but from Bruce's posts lately, it seems like he leans toward using PBs as a Condition for the trigger (versus using the PB as a Reqd Expression).
There seem to some edge cases where PB as a Reqd Exp can end up whiffing -- those seem to be rare, but using PB as part of a Conditional Trigger apparently does a better job mitigating that circumstance.
I used to always use PB as a Reqd Exp, and I never had an issue myself. But I've since started using them instead as a Conditional Trigger (again, no issues).
Just food for thought and maybe something for your bag of tricks.
Also worth noting @davidcwright59 (and it may be intentional), you haven't automated the turning off of that light so it'll be 'via finger operation' unless you add something else to the rule or it gets turned off by another rule
You are correct, There is no automation to shut the lights and fan off. I could add it to my lights out button, but then the wife would have nothing to do.