Hello everyone,
With the recent hot weather, I finally had the motivation to build a more intelligent sun protection logic for the roller shutters on three sides of my house.
I have to admit that this flow is also a bit of a showcase for several cards from my apps Flow Gadgets and Sheets Log Dispatcher. They help make this kind of automation more compact, easier to maintain and, in my opinion, much easier to read.
The logic is still being fine-tuned, especially the luminance thresholds, but overall it already works very well.
On every azimuth change, the flow checks whether sun protection should be active. It takes several conditions into account, such as daytime, the forecast maximum temperature, sun elevation, and whether the sun protection mode is enabled.
If the conditions are met, the flow decides which side of the house is currently affected by the sun. The shutters are then controlled side by side, depending on the sun’s azimuth, the measured luminance, and the current shutter position.
When the sun moves away from a window, the shutter does not simply open immediately. The flow first checks whether there is still too much diffuse light or remaining radiation that could continue to heat up the room. Once the luminance has dropped far enough, the shutter is opened again.
The flow also uses “true once until released” logic to avoid sending the same shutter command over and over again, and Sheets Log Dispatcher logs the relevant values so I can adjust the thresholds based on real-world behaviour.
It is probably not the simplest flow ever made, but it has been a very useful real-world example of how azimuth, luminance, temperature and helper cards can work together to create smarter sun protection.
Feel free to comment, ask questions or suggest improvements.

