Turning Off Lights By Illuminance

Hi All,
I have recently moved from controlling my lights from sunrise/sunset to using outside illuminance sensors and that worked great.
I'm now moving some of my automations to use indoor sensors as areas further from the windows can be a little darker especially when it's overcast.
This all works well for turning on the lights but I'm still trying to figure out the best way to turn them off when it gets brighter, as the inside lighting affects the sensors.
I'd be interested to find out how others do this, or if you don't control the lights during the day.

I normally don't control my lights during the daylight hours, but do have an ugly exception that allows them to turn on if the outside lux is below a given level. The actual value varies by room by hour because the windows in each will illuminate different based on the angle of the sun and their orientation. At one point I also tried adjusting for the seasons, but found that ROI/WAF wasn't there.

For me, my living has recessed can lights so I put the sensor up high and they basically have very little effect on the value... I don't worry about time of day, angle of sun, curtains open/closed as all that is controlled by the illuminance, been using it this way for over 2 years and it works great

One thing I did have to play with initially was the turn on and turn off values to help reduce the popcorn effect

Here is my on

Here is the off

Good luck


I have one illuminance sensor facing north in a skylight. Then I set two different global variables at different levels in WebCoRE... darkInside and darkOutside. I use those two variables to run all my lighting automations. "If motion and darkInside is true..." "If someone arrives and darkOutside is true..." Anyway, the lights turn on inside long before they turn on outside.

It was kinda funny a couple weeks ago we had some storms come through in the middle of the afternoon and it got DARK. Like REALLY dark. Both the inside AND outside lights came on. I had never seen my landscape lights come on automatically at 2:30 in the afternoon before! lol


Iluminance was a tricky thing for me - not being as brilliant as so many individuals here - I had multiple sensors - and I found that this parameter is not consistent between vendors and devices. For example, the Zooz 4 in 1, reports Illuminance while another device reported 'lux'. (I can't recall the device atm). as well, reporting by device is not real-time - some are triggered by % of change, others report on a schedule/regular basis. In addition, the scale used can be non-standard as well. Devices may report 0-100, or 0 - 10,000. In the end, while all my complexity did work for the most part - I simplified and improved my overall by using an outside service OpenWeatherMap in conjunction with WeatherUnderground. The OWM service reports illuminance really nicely and accurately, and the WU service is a bit more specific to my house (the station is 2 blocks away!).
I setup an overlay on a camera feed so I can see the uptodate values - very helpful during initial tuning but to involved to detail here. In the end I really am happy with my solution! I'll add I'm also using a Circadian Lights app to manage a few particular lamps that are mode/background lighting. Hope this gives a few ideas to you.