Outdoor illuminance based on sun elevation and weather conditions

That’s great! Thank you.

Another input I have been using as an approximative light sensor is the power production of my solar panels. It does require some tweaking to relate it to light levels.

I had the same idea a few years ago and wrote my own rule, based on the sun elevation and the cloudiness value from a weather binding. When I updated my installation recently I saw that somebody implemented a rule template based on the radiation value, so I gave it a try.

My problem with the Virtual Solar Light Sensor: the moment the sun is set, the radiation value becomes zero, so the virtual light intensity results in 0 Lux. But in reality, it is still bright outside - I want my blinds to shut when it really starts to get dark, right before I’m starting to feel uncomfortable having them open.

I played around with it over the years, and adjusted the values each time my wife complained about the blinds shutting too early or too late. And I found out that when it’s very cloudy (100%), sunset is indeed the right time to shut them. But when the sky is clear, this moment comes around 20 minutes later.

So my rule triggers exactly on sunset (plus up to 5min because of the update interval), and then delays the blinds for 20 minutes * (1.0 - cloudiness / 100). This is close to our ‘sweet spot’, and the rule runs now for about 2 years without the need of adjustment and without us ever noticing bad timing, or thinking about this rule at all.

My experience with real sensors is exactly what has already been pointed out, they need to be heavily debounced because of reflections, car lights, motion lights etc. Never got a satisfying result out of them.