Hi, does anyone know if it’s possible to have the sun elevation information for the next 24h-48h?
What I’m trying to do:
Having solar panels on the roof I’m trying to predict the approx. solar energy I would be receiving for each hour today. From the solar production history data (plus local weather history data), I have been able to estimate, on a 100% clear day, total energy of (elevation / 8) kWh, so for example on an hour when sun is at 40-degree I’m getting 5 kWh. It’s very consistent and accurate enough. On a 100% cloudy day it’s (elevation / 40) kWh. The partially-cloudy should be somewhere in between.
While buying electricity from the Nordpool with every hour changing prices, I would be able to estimate in the beginning of each day (at midnight) the estimated solar production for the day, taking into account local weather forecast. I could then construct my own Nordpool electricity price graph for the coming day where the solar production is taken into account in the electricity price.
There’s HACS integration “Sun2” and its sensor “Elevation at Time Sensor”. I was using that sensor to gather all the necessary data for my equations. But it needs help from another sensor (which is providing the wanted day/time to calculate the elevation). I can’t use this sensor inside a jinja2 template to get the elevation data for the next 24h.
If nothing else comes up, I’m thinking to run a 24x “repeat” -loop in an automation that will change “input_datetime” sensor for the “Sun2 / Elevation at Time Sensor”. Then I would read the “Elevation at Time Sensor”, store its value in an “input_text” or something, and eventually have a “text_sensor” storing a list of elevations for the next 24h.
Are there any easier solutions?