I need help with rule machine and presece

I am having a hard time creating a rule for my wife when she leaves the house for work using presence and modes in the morning. I already can create a rule that it will use presence to change to “departed”, and all the lights and window shade will close and turn off automatically as soon as soon as she leaves the house. I also already have a rule to turn on the lights and open the windows (presence arrived) when she gets home. My problem Is that I can’t figure out who to use a rule with modes for arriving home after a certain time or at night and to keep the blinds close or turn on the lights. I am trying to use the same rule and eswith modes. I have different modes for morning, late morning afternoon, mid afternoon, late afternoon, night and overnight. It works find in the morning but I can not figure out how mides work with presence and conditions in the afternoon

End cap
Turn on light only if it is after 6pm
Thanks!

I hope someone had experience with this

One option would be to create multiple arrival rules, each with their own “Required Expression”. This way, one rule could be set to run if the mode is late morning, and another if it is mid afternoon, and yet another if late afternoon, etc.

Another option would be to add if conditions for each mode in the rule (if using Rule Machine) that will only perform actions based on the result of the condition.

1 Like

That is what I am trying to do with conditions if this, but I can’t figure it out on how to do it right

Here the last rule I did

Aimee is the person who triggers the rule to occur, right? Assuming this is correct, the first “IF” condition is not needed - her arrival should trigger the rule.

The 3rd “IF” (between 7:08 and 5:08) should be replaced with an “ELSE-IF”, which will allow you to pick the already created condition from the drop down list. The last condition could be an “ELSE” which will catch all other conditions.

Also, don’t forget to add an “END-IF” at the end which tells Rule Machine that it is done checking for conditions.

I would change mode based on time and then the rule trigger would be she arrives or departs or changed depending on what you are trying to do... then in the rule

If mode = x
Then
Else if mode = y
Then

Else

End if

2 Likes

Thank you!
I be will try that

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.