Forecast.Solar - How to Compare Daily Forecast To Actual Solar Production?

Has anyone figured out a way to map tomorrow’s predicted solar production forecast from forecast.solar to the actuals the next day?

I created as sensor to show me the diff between the forecast for TODAY minus the actual production from today about 1.5 hours after sunset, but I noticed that the forecast changes throughout the day. I’m thinking I need to snag the forecast the day before and then get the difference between that and today’s actual production to see the accuracy, but I haven’t figured out how to extract thta one data point into a sensor.

My goal here is to easily track how accurate forecast.solar is in my configuration so I can tweak it appropriately.

I do a similar thing with my temperature forecasts.
Every night I copy the forecast sensor (data via api) to a separately entity with which I then construct graphs, this allows me to find out which forecast provider (I have 3) is better. The main reason here is to not (!) have 3 forecast providers in the end and taking the best one. My automation uses the hacs automation script hass_entities for that

Interesting. Could you share more specifically about what you have set up and how it looks?

Is it this hass_entities script? I’d be interested to see how your automation is setup and how it’s useful. Appreciate it!

I used the gui for this but in the end the automation looks like this, it triggers at 6 and also when I restart the machine…else it will remain empty.
Again…it copies the weather forecast attribs …but this is imilar as to what you can do

alias: Set forecast at 06:00
description: fix forecast at 06:00 to compare with actual
trigger:
  - platform: time
    at: "06:00:00"
  - platform: homeassistant
    event: start
condition: []
action:
  - service: python_script.hass_entities
    data:
      action: set_state_attributes
      entity_id: input_text.forecast_owm_hourly_0600
      state: "{{ 'Switched on at '~ now().strftime('%H.%M') }}"
      attributes:
        - icon: mdi:home
        - forecast: "{{ state_attr('weather.openweathermap','forecast') }}"
  - service: python_script.hass_entities
    data:
      action: set_state_attributes
      entity_id: input_text.forecast_meteof_hourly_0600
      state: "{{ 'Switched on at '~ now().strftime('%H.%M') }}"
      attributes:
        - icon: mdi:home
        - forecast: "{{ state_attr('weather.mougins','forecast') }}"
mode: single

ahhh, thank you.

So it’s an input_text entity that’s recording the values - makes sense!

And then I have this graph to compare actual with fc…for today not too far off :slight_smile:
image

that looks great and exactly what I’d like to see with my solar forecast vs production.

What does the hass_entities script do for you more than just having an automation set the value of the input_text entity directly at a certain time daily? Is it something to do with your desire to see comparisons hourly?

Since forecast.solar updates regularly throughout the day, the diff calculation I have changes as well. So I’d like to know after sunset the night before - what did they predict versus what I actually produced at the end of the next day.

The hass script allows to update states and attribs of existing sensors, e.g. if you cannot get those values through the sensor/template itself…esp. updatinf attribs is quite a challenge wihtout it