I have a rule that I sorta copied from someone else's example. I want a notification when motion is detected, but only once till 15 minutes has elapsed. So tell me what I am doing wrong.
Here is the rule:
Edit: Looking at what you need again and you might just need to leave your rule pretty much as is but deselect the Enable/Disable with PB option and add and if PB is True statement at the beginning. Give that a shot first and if it doesn't work for you, then try below.
Firstly you will need a Triggered Rule instead of just a Trigger. Secondly you will need to deselect the Enable/Disable with PB option.
The triggered rule will give you True Actions and False action.
It's still confusing. It appears from this statement from that post that my rule should have worked. But it's not worth spending time on, I have changed it as you suggested and it works and that's all that matters.
QUOTE: 'If a rule is restricted nothing happens, irrespective of how it is restricted. So yes, PB false with PB restriction prohibits rule from running.'
The confusing part for me was the enable/disable rule with PB toggle. I thought this was a necessary part of using the PB. It is not. If you do use this toggle to disable the rule, the only way to reenable it is with another separate rule or action. In your case you want the rule to be able to reenable itself after a timeout.
The PB itself does not enable or disable the rule. It is simply a varaiable that can be true or false. In your case we use it (via an if statement) to allow/disallow a small section of code (speak on speaker) to run. If true then allow. If false do not allow....etc.
If you also use the Enable/disable toggle, when the PB is false, it disables the ENTIRE rule, including the part where you tell it set the PB to true. Therefore the PB will always remain false...unless....you setup another seaparate rule that sets the PB to true.
Hopefuly this makes more sense. It was an eye opener for me.
That is not correct. You can have a delayed action within a rule that will still set the PB back to true, even though the PB is currently false.. If you have a rule action such as this:
Set PB to False
Delay 1 min
Set PB to True
After 1 minutes, the private boolean of the rule would be true. Setting PB is the one action that can violate PB restriction.
You can see in the events that the PB is set to true 10 seconds later. Want another piece of evidence about setting PB not being restricted by PB? Take this action: