Do these rules look right?


#1

I'm basically trying to do have 2 rules for when I am away. One rule for daytime - basically turn every light off. One rule for Evening/Night when away - only turn off some lights.

I think I have the first one ok, but the 2nd one, I think is wrong. It's the TRUE/FALSE that is throwing me off. Any help would be appreciated.


#2

When viewing a Rule, it will show what the current result of the IF Condition is. So, in the first rule, I am guessing that your current mode is either Away or Day, and thus it shows that condition as being TRUE. Likewise, the second rule shows FALSE since the current value of mode is not Evening or Night.

I think your rules are fine.


#3

Perfect! Thank you!!! Learned something new for sure.


#4

In my opinion, you'll get more consistent results if you change your triggers to iphone presence changes and add mode changes to your trigger events. That way the rule will evaluate when the phone status changes and when the mode changes. then use the if statement to show that if iphone presence is away and mode is evening, night then .. Since you only posted part of your rule, make sure you close it with an endif to round it out.


#5

Sorry, not sure I follow...and I posted the full rule, not just part of it???


#6

Sorry, I guess I should have asked, but I now assume that you're not using Rule machine, but a simple lighting app? If you're using simple lighting, then my response would not really apply. I shouldn't assume.


#7

:thinking: Looks like Rule Machine to me. A very nice, simple RM4 rule, with a single Trigger and a simple Conditional Action. It's rare we see such a nice, simple, clean-looking rule...but I like these simple ones. Of course, these two rules could easily be combined into a single rule, with a complex conditional action, adding an ELSE (or ELSEIF) case, and an final ENDIF.


#8

Yes these are both Rule Machine 4 rules.


#9

I think your rule is fine as is, but both of our suggestions might make your rule easier to keep track of and more consistent. My understanding that triggers showing "changed" will then trigger evaluation of the rule. Then conditions defining state will trigger the correct behavior. Also combining them would keep everything together like Ogiewon suggested. But, It's totally up to you. It's your rule and I think it will run just as is. If you see any inconsistencies, you could consider our suggestions.


#10

Thanks for your feedback! As a newbie, I'm very appreciative of it.


#11

If you change the Trigger to iPhone changes then you will need to have a condition of the iPhone leaving. I have an older RM 2.5 rule setup for when we leave and arrive at home. I haven't changed these to RM 4 yet because they work well for now.

Leaving:

Arriving:


#12

Here is my away rule. My mode changes to home if any of us shows up and changes to away when both of us are gone. It's in RM 4. It runs flawlessly.

image


#13

Thanks April. I life this, but I'm not using a mode of HOME. I have Day, Evening and Night, so I think setting it gets a little more complicated. I'm thinking a simple rule of Life360 leaves, then set mode to Away, And I had to have another rule for guests when I'm not here, that if someone opens the front door, to set the house to Guest in the House mode otherwise I'm afraid any lights that they want to turn on will get turned off.

Is there a certain order that these rules run in? If I leave and I have a rule that sets to away and turns on off lights. Then lets say an hour late a house guest, housekeeper or anyone with a key opens the front door and HE knows I'm not present since Life360 knows, can guests go about their business interacting with lightswitches and sonos without the house going "hey Larry isn't here, HE should turn off all devices." I'm confused at this part for sure.


#14

RM Rules only run when they are triggered by an event. So, leaving your home and having Life360 upadate your presence status to "not present" is what causes an Event to be generated one time. RM see this event and executes the actions of the rule, one time. That rule will not run again until you come home and then leave again. So, it is important that you choose your triggers wisely, to achieve the results you desire.


#15

Thank you for that explanation!


#16

This is so true. I have rules that coincide with our habits. Home, away, quiet time, night. Presence triggers away and home and having a phone or both phones on the docks in the bedroom triggers quiet time and night. We are creatures of habit for the most part, but nothing happens at the same time, which is why I chose these 4 modes for every day life. The house reacts to us going to bed or waking up. Coming or going. TV on or off. Then there are temporary modes that trigger for the cleaning lady or guests. I can pause some of my more persistent rules to keep poltergeist from happening. It works well for us. So there is no right answer for how you use your triggers and modes. It depends on what level you want your house to interact with you. I don't have dashboards littered around the house. I don't use voice commands. Automations happen as a reaction to our actions or habits. Enter a room, a light turns on. Dock my phone on the charger and my house knows that I'm in bed but my husband is not. Let's adjust the lights so that you can sleep, but he can get a snack in the kitchen without all of these lights waking you. When I started HA, my husband agreed to it as long as he didn't have to learn anything or do anything special. He doesn't want to argue with Alexa to turn on the alphabet light located in the obscure corner of the house. It just needs to work. Challenge accepted.