How to get sun.elevation for each hour today

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?

Integrations like Solcast give predictions based on elevation, waether, roof orientation and panel wattpeak. They calibrate those with known solar farms. So you do not need to do your own predictions.

Thanks for this link!

Before creating an account I can see the “Home User” free version does not have a weather forecast. And does anyone know if the free can handle two solar arrays (east and west)?

I have tried the Home Assistant’s “Solar forecast” in the Energy dashboard, but it’s a hit&miss (usually miss). And I don’t know if I’m able to use the data in templates. Is the Solcast better than HA’s integrated forecast?

EDIT:
Registered and got the API key. Haven’t been playing around yet enough to know what this is capable of, but I have a general feeling I’m not able to get “hourly” forecast for the next 24h including weather conditions.

The default forecast was also mostly miss for me, Solcast is mostly right for me on the free version. Also for bad weather.

Here march 2nd and next week for my solar panels that are on the northeast, so not well positioned. In the week graph you can see it is expecting low yield at the end of the week, which must be weather. As you can see there’s hourly data for march 2th.