[Released] Rule 4.0

What is triggering the mode change from away to home?

many things: that somebody besides me arrived home, that a specific code was entered in my Yale lock, a specific time, that probably my wife and I are together and we left a presence sensor at the house and it changed my mode from away to home, etc.. So I just want to know that the home is not longer armed because of any of mentioned actions when I am not at home

As another example. I have a rule that turns on certain lights when a door is opened. But ONLY if the mode had changed from Away to Home and only the first time the door is opened after the mode change occured. I ended up using a virtual switch that is set when the mode is Away. Then when the door is opened I look at the switch to see if it is on and if so turn on the lights. Then I turn the switch off so it doesn't happen again. The trick is, if the door isn't opened in some period of time, turn off the switch also so it's ready for the next go around.

It took 2 rules to do this. I couldn't figure out anyway to do it all in one rule.

So I can see where putting the mode in a variable can be of use.

That can be done by a boolean variable when the mode changes. That would be much easier than using the mode.

If you are talking about my case, it is based on mode change. So mode has to be used. And yes I could use a Boolean variable instead of a switch, but at the time I set this up I wasn't that familiar with the variables. And by using a Virtual switch I do have other options to clear it if I need to. If for some reason the rule didn't function right or whatever I can manually turn the switch off.

Possible bug, under refresh devices, keen vents are not being shown as devices.

Keen vent does not have Refresh capability. You can still refresh it using a Custom Action. We only include Refresh capability for devices that need polling, of which Keen vents are not one.

Can we add a new capability to repeat so that we can choose to not have multiple repeats scheduled?
I find if I have multiple triggers this can happen, I have had to add globals to get around it.


pic showing multiple repeats:

I'll also ask if there is a better way.

Got it thanks!

Multiple simultaneous executions of a rule is not supported, and will surely break. So, no, you can't do it this way.

Hey @bravenel I managed to make a "repeat" to stop when my door is closed or when the water leak sensor is dry but actually the TTS notification will speak 1 additional time after my door is closed or after the water leak sensor is dry. So how can I make the repeats to stop exactly at the time any of those two things happen ??

I'm seeing a bug with editing/inserting Actions. If I have an IF/ELSE IF condition, and I insert an IF condition before the first IF, it inserts it fine. But then if I edit the 2nd IF condition, the condition gets messed up.

There doesn't seem to be a way to edit a condition to a different condition. For example, I need to add a different initial conditional check before my original IF/ELSE block. I insert before the IF another IF, but then I can't change the original IF to an ELSE IF. I tried to insert an ELSE IF before the original IF so that I can delete the original IF conditional, but that's when I saw the weird concatenation bug.

Not able to reproduce a problem with this sequence. You need to show screen shots that demonstrate the problem you have.

Short of doing the whole screenshot thing, if you have the following rule created and saved:

if () xxx
else if () yyy
else if () zzz
end if

how would I add a new "if" condition at the beginning such that the original "if" becomes an "else if"?

if () sss
else if () xxx
else if () yyy
...

To clarify, the trouble I ran into was because I didn't know how to make this change. I tried to "Edit if () xxx" line, but couldn't figure out how to change the conditional to "else if", so I cancelled the change. Then I tried to "Insert before the action xxx" (not "Insert before if () for action xxx") a new "else if ()" conditional, but then it created a "else if (condition 1 condition 2)" after the "if () for action xxx". I know this is confusing, but the steps I was able to take is what seems to have confused Rule Machine.

It seems that anytime I call a private boolean set, it triggers a private boolean changed even if I don't change it from true to false, or false to true:


Rule:

If I change the private boolean to a virtual switch or global vat it works properly and only gets called on a change.

You can't change an IF into an ELSE-IF. You would have to delete that action and add/insert a new one.

Ok. Hopefully this will be possible in the future, being able to replace the line that's being edited.

One other bug found. I have 3 conditions defined with conditional actions as mentioned (if a else if b else if c).

I edited the conditionals (all three, basically just went from 1 temp sensor selected to two per condition), and noticed the conditional actions changed to (if b else if b else if c). Since I can't make any changes to the line once created, I had to delete the first "if" and re-add the correct condition.

Confirmed on other rules as well.

The Private Boolean changed trigger bug has been fixed, will be released in next release.

awesome, using a global var as a work around.
Thanks!