Rule help needed. Lux + Condition

Trying to turn a light on 15% (for dog) when it gets darker in a room that has a motion/combo/lux censor in it. But I only want it to do so when HSM is set to away.

Thank you for any and all help!

Thereā€™s a million ways to do it.

Assuming you want to do it all in Rule Machine and not a specific motion app then hereā€™s an example of how I would probably do it (see attached).

-my hallway motion doesnā€™t capture lux so I just selected my outdoor hue in this example -

2 Likes

Hereā€™s another one, except it uses Mode instead of HSM Status. This one will turn on if either the lux gets so this level or if the mode goes to away:

You will also need to add something to turn it off, otherwise it will stay on until someone manually turns it off. :slight_smile:

1 Like

Ok, your right! Need to maybe create a separate rule then to turn it off based upon higher lux?

What are good lux numbers to use for indoors to activate lights?

Ok all of these true, false and not's are confusing the crap out of me.. I don't understand why they are there or what it pertains to.

I reworked this based upon the examples that you guys gave me. Unsure if this will work. How does it look?

With your rule, the light will only turn on if the illuminance becomes 2, 1 or 0 while you are in the stated evening, away and armed away modes.

It will not turn on when you change the mode to Evening/Away. It will not turn on when you set HSM to Away. Is this what you are looking for?

To turn it off, you should either create a new rule that will shut down the light, or change the trigger of the current rule to activate on ā€œchangeā€ instead of on ā€œreports <=3ā€. If that latter, you can add an else condition that will shut down the light. This will shut down the light when the system is not armed away, when the mode is not Evening or away or when the Illuminance is >=3.

(It will work anyway, but it is good practice to add an ā€œEnd Ifā€ at the end.)

As for the value to use, every sensor that I have report different values, so I would recommend that you note the value from yours when you think it should activate.

The (T) and (F) indicate if the specific part of the trigger is currently (when the rule was last refreshed) true or false. The [TRUE] or [FALSE] indicates the same for the complete trigger. In your screenshot, the rule will not run because it states [FALSE].

I believe that is what I am looking for. I am not trying to tie it in with putting my HSM on away or my mode changing to evening. I just want the light to turn on IF we are not home (HSM set to Away) and only in the evening as obviously in the early morning hours it is rather dark when we leave for work and I don't want it activating then. Does that make sense and align with what I think I set? So the trigger and the actions to run both have to contain the illuminance portion? or could I have just started the actions to run with IF HSM, etc etc etc..?

I will tackle this first and then perhaps try the "change".. I am still unclear about the true false. I have to wrap my head around it.

I inserted the End If.. :slight_smile: Thank you!!!!!!!!!

1 Like

The illuminance only has to be in the trigger unless the trigger is set to ā€œchangedā€.

Iā€™m sure youā€™ll get it as you use RM more and more.

Soooooo.... Still having issues with this one. Added turn on lantern just to see if it would make a difference. No difference. Doggie still sitting in the dark.. lol poor dude.. so this is what I have.. what do you guys think I need to adjust? My goal is to have the lantern turn on when it gets relatively dark where my motion/lux sensor is but only while HSM is set to away (we are not home) AND mode is evening (so it does not activate in morning).

I would recommend that you add 2 triggers:

  1. HSM status = Away
  2. Mode = Evening

Otherwise, if you leave after the illuminance is 0, the rule will not trigger and your dog will be left in the dark.

1 Like

This fix was SPOT ON. Thank you so very much, Sebastien!

1 Like