BluePrint Motion Sensor illuminance activated

Hi Team. I am using the following blueprint to turn a light on based on motion. freakshock88/motion_illuminance_activated_entity.yaml

I have the BluePrint setup but i am just a little unsure on the field for (OPTIONAL) Illuminance cutoff value

Lets say the motion sensor right now is showing 500 for the illuminance and i set this field to 500 am i saying that anything less than 500 will switch the light on?

Took me 15 minutes to find that Github Gist.
In future see if you can link to the source you are using.

Same issue with the same Blueprint happened in this thread from a year ago.

“Quality questions get quality answers”

Interpretation

In the comments we can see:

… whether the illuminance level is low and the automation needs to trigger

My interpretation is that you’re setting a ceiling for triggering. Meaning the target illuminance needs to exceed the value you set.

It makes logical sense. If it is very bright in room, why would you want the lights to turn on?

This will not turn on as 500 is not less than 500. If the sensor read 499, then 499 is less than 500 and would turn on the light.

Supporting Code

Templating is a little gibberish to me but it looks like this line does the logic:

(illuminance_defined and (states(illuminance_currently) | int(0) < states(illuminance_cutoff) | int(0)))

Correct me if I am wrong but this reads:

  • If you’ve defined an illuminance cutoff; and
  • the current illuminance value is less than (but not equal to) the defined illuminance cuttoff;
  • return “true”

Hope that helps