I’m trying to control the way one of my Sonoff Basic turns on or off depending on the cloud coverage. I’ve used sun up and sun down before but would like to turn on the lights if for instance the sun is covered by clouds midday.
I have installed the SMHI integration (Swedish national weather forecast) and the entity has an attribute called cloudiness (0-100; probably percentage of clouds) that might work but I can’t figure out how to use that attribute? I have tried to create an automation using a Trigger but that doesn’t work.
Well, personally I’d invest in a lux/illuminance sensor - then you get actual light levels, not a vague guess.
The latest Xiaomi Mijia one (such as here) is really rather nice. The sensitivity is good, it reports in a sensible manner (regular reports of minor changes, instant reports when there’s big changes).
Great! Will go for that solution instead! Sounds much better because the SMHI integration seems to give vague and estimated values that are really off.