There are three ‘time features’ to the solar forecast / HA integration.
- The figures are indeed plotted one hour out (to the right) against the chart of actual production.
- DST and time zone issues can add/subtract one (or more) additional hour depending on individual settings.
- The weather changes over time and the base forecasts change, so the forecast changes during the day.
The first point is now agreed, so that for many/most/all of us, the line needs to be shifted left by one hour (and only one hour). The symptoms of this ‘right-shift’ are, a low or zero slope to the start of the dotted line, the peak not matching solar noon, and a hanging right hand end. The hanging end is due to both the shift and the plot not extending by a further hour to get back to zero at/after sunset.
The second point is problematic, since HA appears to do everything internally on UTC, and converts to ‘local time’ based on machine time zone settings as and when required. If one part of the system does not “follow the rules” then time used by code can be out from local time at the point of use. DST changes make this more complicated still. Since much of this (great) development and integration work is done by people living in The Netherlands / Europe, they experience UTC +1 (or UTC +2 in the summer). I live in the UK, so my HA is set to GMT (or BST as our DST in summer) which is equal (but not equivalent) to UTC. When developers and testers are +/- 7 hours out from UTC then it is very apparent when local time is not right. When you are +0 or +1 hour off UTC, then DST or living next to someone in a +/- 1 hour different time zone can (quite rightly) be blamed for a great deal of confusion. For me, UTC to local time is currently +0, so human/code errors in UTC-to-local time zone management do not show up.
There is also the question of forecast.solar time. The site appears to use the geographical location provided (from your HA location settings) to calculate effective local time (not UTC) at that location and to return the required data based on (ISO format) local time. My experience is that sunrise/sunset in the forecast and API always matches my local sunrise/sunset, so it does appear to work correctly, but that is only for myself. USA users with multi-time-zones per country may have a issue where forecast.solar is getting local time wrong. If forecast.solar local time for you is +1 or +2 hours out, then the plot will be +2 or +3 hours out.
The third point is a natural consequence of cloud. The solar forecast is updated at regular intervals, and the base weather forecast likewise, so the graph will change. The upcoming forecast can change quite dramatically as the base weather forecast used is updated. I have seen a great solar PV day turn into nothing, and vice versa. Interestingly the solar forecast will change historically as the day progresses, which can have a big impact on the ‘energy generation today’ figures. It can also lead to these dramatic plunges in the graph that can sometimes be seen either during the middle of the day or at the end of the day.
The orange line is the forecast (which is updated for the entire day every hour). The magenta line is a copy of the forecast for the hour, kept as history of what the forecast was. This graph is generated from direct forecast.solar API calls, so in-day forecast change (and the apparent shift of my actual to the forecast) is not an integration / HA issue.
I believe:
1 is an integration feature - the solution (for now) is to use the forecast.solar API directly yourself, or mentally shift the line one hour left.
2 is a more subtle issue where different components might not be strictly adhering to ISO standard timestamps for UTC and correct local time zone conversion. If everything was UTC, or everything was ‘local’ (whatever that means for you) I am sure everything would be fine! Note that (2) may be cancelling out (1) in some cases, so those that develop this stuff are clearly reluctant to fix (1) and cause a problem elsewhere.
3 is down to ‘weather’ and ‘forecasts’.
The fact that this (free) integration is anywhere near right at anytime is, I think, quite remarkable. My grandmother used to check a bit of seaweed she had hanging up in the garden. If it was wet, she knew it was raining.