Hadn’t seen this thread before. I have posted a pretty similar solution here quite some time ago. It`s my oldest example and I haven’t really reworked it so probably not the most elegant one in terms of coding, but hey, it works.
I’ve also experimented a lot with weather cloud forecasts and lux sensors in- and outside.
Inside is just not reliable. The crux with an outside sensor is placement and water proofness. I learned the hard way, killing one or two multi sensors along the way.
I now have one 4-in-one (gen 5) and one (latest gen) Aeotec multisensor 6 in operation.
The older one has a lux detection limit of 1000 (which is quickly surpassed when it ain’t cloudy) while the new one can do do up to 32.000 which is fine. The older one is said to be somewhat waterproof at least while the new one clearly is not, so what I did was to get a waterproof enclosure for it. I actually bought some outdoor spotlights and replaced the bulb with my sensor.
By the way, consider using persistence and a sliding window instead of a hard hysteresis, no matter if it’s about the lux or cloudiness values. See my linked thread.
That really helps a lot if you don’t want your shades/shutters to constantly keep toggling.