Multiple Presence Sensors

Totally new to this world but been learning and enjoying it. I'm trying to use RM to Arm HSM when multiple presence sensors are away. I'd also like to use the same for adjusting the thermostat. The Trigger description says "any will trigger" when I need for both to be "away" to trigger. Any guidance would be appreciated.

Any will trigger, but you can use conditionals in the actions to determine what actually happens.

For example:

Triggers:

Presence A *changes* OR
Presence B *changes*

Actions:

IF (Presence A is away AND Presence B is away) THEN
  /* Do stuff here for when all are away */
ELSE
  /* Do stuff here for when one or both are present */
END-IF

You can add ELSE-IFs or whatnot to account for other conditions (e.g., one away but one not, both home, etc.). If you really only care to do something when both are away, your triggers could use "departs" instead of "changes," but since you're checking for that in the actions anyway (and Rule Machine has to do the work to check either way, whether you do it yourself or it does it for you behind the scenes), I don't see a clear advantage either way here except that "changes" allows you more flexibility to expand your actions like this for other cases.

1 Like

Thanks for taking the time... Just came upon the "Conditional Actions". Will have to dig into that.. A lot to get my head into but I can see you can go as far as your imagination allows. Wow!!

1 Like