First effort with Rule Machine

Hi,

I have been struggling to create a rule to achieve what appears to be a simple task.

I want a z-wave smart plug to switch on every evening at 22:00 and off again at 08:00 the next morning. The complication is that I also want the same smart plug to switch on when Life360 says 'Away' and to switch off again when Life360 says 'Home; except if the Home time falls between the normal 'on' time of between 22:00 and 08:00.

I would appreciate any pointers for the best way to attack this project. I am not at all sure that it can be done in one set of rules.

I have no problems in getting the regular daily function to work properly. The problems start when I try to involve the Home/Away aspect.

I have attached a GIF that illustrates what I am trying to do.

Thanks for any help received.

1 Like

I think you are overthinking this one. Simplify it and think about it in terms of when you want the switch on.

Switch always needs to be on between 22:00 and 08:00. Switch also needs to be on any time presence is away. This is an OR condition:

Time between 22:00-08:00 OR Presence is away (switch on)

The inverse for switch off is:
Time between 08:00-22:00 AND Presence is home

Do I have that right?

3 Likes

I agree with @destructure00, I think you are making it overly complicated. I believe his rule will work for your requirement. Look under his Define Rule definition:

(Time)                  (Present or Not)
10:30 PM     OR         Home
TRUE         OR         FALSE = FALSE = LIGHT ON

10:30 PM     OR         Away
TRUE         OR         TRUE = TRUE = LIGHT ON

5:00 PM      OR         Home
FALSE        OR         FALSE = FALSE = LIGHT OFF

5:00 PM      OR         Away
FALSE        OR         TRUE = TRUE = LIGHT ON

Hopefully you understand my rudimentary explanation :slight_smile:

2 Likes

Thank you all for taking the trouble to break down the elements of my problem and presenting them clearly for me. As I have had just a day to get to grips with Rule Machine I will need to do a bit of work based on the above.
Many thanks.

1 Like

This was very helpful to me too. Thanks guys.

1 Like

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