I am seeing RM5.1 required expressions being ignored when they contain HSM status. In the below rule the disarm and lamp on command are run whenever the second half of the expression (at least one presence device is present) regardless of the status of HSM. Could this be a bug?
Turn on all Logging for the rule and post a screenshot. Redacting your images isn't going to help find what's happening. Just change the names while you get this sorted.
I set up a rule just like yours and it works as expected. That is to say, with HSM Status Armed Night false (because HSM is not armed for night), and two presence sensors both gone, then one of the arrives -- the rule is not triggered -- as it shouldn't be. When both arrive, same thing.
You really have to turn on Logging for Events, Triggers and Actions to show what is actually happening.
Just to clarify - the required expression requires HSM to be Armed Night and at least 1 presence to be present. Does that align with the test your end? I'll get the logs drawn up and sent over ASAP
P.S. Good idea on changing the names of the devices!! Wish that had occurred to me!
Pablo returns - rule fires and actions take place. Results in HSM being disarmed and the required expression evaluates to false but this is NOT reflected in the logs
I think there is a logic problem here. This rule won't fire until the second person arrives, not the first. When both are gone, and HSM is armed, the arrival of the first causes the Required Expression to become true -- but it was not true at the time of the event so the rule will not fire then. Upon the next arrival, Required Expression is true to begin with, so it is triggered, and HSM is disarmed then.
However, I did discover a bug related to the trigger of any presence arrives. as this is triggering when the first trigger departs. This bug will be fixed in the 2.3.2 release, now in beta. And, consistent with your findings there is a separate bug related to HSM Status in a Required Expression. This one meant that it failed to detect that the Required Expression became false when HSM was disarmed. This too will be fixed in the next release.