Turn on light based on luminance -> "When light on then luminance high" problem

Hello.

I have a motion sensor with integrated luminance sensor and simply want home assistant to turn the light on, only if the luminance is below a certain value. The problem here is: When the light turns on, the sensor reports a high luminance and in the next step, home assistant will turn off the lights after some minutes since luminance (because of the light) is high enough.

Does anybody know a solution to this? I have the Fibaro Motion sensor if that helps. I already tried the built in configuration “Motion detection - operation mode” to “PIR sensor active during the night only” but the same problem arises.

Thank you very much

If the light is on, don’t look at the luminance.

Side note, if you are trying to get a dawn/dusk outdoor light. Just use the sunrise/sunset with an offset. You’ll save a boatload of time instead of dealing with logic that always contradicts itself.

Hi Petro

The light is indoor and if its cloudy, it can get quite dark in the room.
The problem with “When light on, don’t lookt at luminance” is: Lets suppose that the light turned on because its dark and during the “light on” phase, a new luminance measurement is reported to HASS. If the light turns off and some seconds (or minutes) the motion sensor reports that a motion is detected, it could be the case, that the light sensor didn’t report a luminance value during the “light off” phase. So the light won’t turn.

1 Like

I too found that sunset and sunrise worked okay, but in certain weather is not good enough. For example, during today’s snowstorm they haven’t (and shouldn’t) turned off once!

I have an aeon labs multisensor 6, and don’t have this problem at all. It detects the sun as just being sooo much brighter than my lights that there is no cross talk. Maybe this sensor has a different sensitivity? Or my lights are just much more dim than yours? Either way, one option is to use a different sensor.

To implement a form of @petro’s idea, maybe you could have the automation that checks the brightness run every minute or so, with a condition to check that the light is not on? That way if it turns on the light, it should be on by the time the check next runs. That leaves the question of how to turn them off…

I think your best options might be to re-position the sensor, put some sort of screen on it so it can’t see the nearest light but can still see the room, or get a new/second sensor.

I get what you are saying, but if you put a lumen detector in a room with a light and are trying to automate said light off that detector, you’re going to have a bad time. If you want to base your light off the outdoor light, put the multisensor outdoors.

There isn’t going to be any logic that you can use with just the luminance value alone because of the light/lamp. You either need to add to the equation or segregate the sensor from the light.