I am working on automatically adjusting covers for my windows. The adjusment is noisy, so I want to do it every 30 minutes. Therefore, I don’t only need the current elevation, but also the highest and the lowest elevation that the sun will have over the next 30 minutes, because I need to set the cover to where the sun will be, not only where it is now.
I have implemented an “improvement” to the sun component to support this:
https://github.com/larsvinc/core/blob/9eb854ef0a6ddb5ecdc4dbe639bedbadab80c90d/homeassistant/components/sun/init.py
https://github.com/larsvinc/core/commit/9eb854ef0a6ddb5ecdc4dbe639bedbadab80c90d
I would like to hear what people think about this. I am not a professional programmer, so there are probably way more elegant ways of solving this. Also, notably, the “period” should come from config and not be hard-programmed to 30 minutes.