Skip to content

Solar Forecast

Marcin edited this page May 23, 2026 · 1 revision

Solar Forecast

The integration can fetch weather and solar irradiance data from Open-Meteo — a free, open-source weather API that requires no account and no API key. This produces six additional sensor entities that show predicted PV yield and current weather conditions.


Sensors provided

All forecast sensors appear under a virtual device called Solar Forecast in HA.

Entity Unit Description
sensor.solar_forecast_today kWh Predicted PV yield for the current day
sensor.solar_forecast_tomorrow kWh Predicted PV yield for the next day
sensor.solar_forecast_cloud_cover % Cloud coverage for the current hour
sensor.solar_forecast_precipitation mm Precipitation for the current hour
sensor.solar_forecast_ghi W/m² Global Horizontal Irradiance — total solar energy hitting a horizontal surface
sensor.solar_forecast_dni W/m² Direct Normal Irradiance — solar energy from the direct beam

Note on entity IDs: Entity IDs are generated from the device name "Solar Forecast" combined with the entity name. If your HA already has an entity named solar_forecast_today from another integration, HA will append _2 to avoid conflicts. Check the actual entity IDs in Settings → Devices & Services → Solar Forecast.


How the kWh forecast is calculated

Open-Meteo provides hourly Global Horizontal Irradiance (GHI) values in W/m². The integration sums them over all daylight hours and converts to expected output:

kWh = Σ(GHI_hour / 1000) × panel_kWp × performance_ratio
  • GHI / 1000 converts W/m² to kW/m² for a 1-hour window
  • panel_kWp scales to your actual panel area and peak capacity
  • performance_ratio accounts for inverter losses, cable losses, soiling, temperature derating — typically 0.75–0.85 for a well-maintained system

This is a standard simplified PV yield calculation (PVWatts method). It does not account for panel tilt, azimuth or shading. For a more precise model you would need a dedicated solar forecasting service.


Setup

  1. Go to Settings → Devices & Services → Sunsynk → Configure
  2. Fill in the forecast fields:
Field Required Description
Panel Peak Power (kWp) Yes Total installed panel capacity in kilowatt-peak. This is the only field required to enable forecast.
Latitude No Your location latitude. Defaults to your HA home location if left blank.
Longitude No Your location longitude. Defaults to your HA home location if left blank.
Performance Ratio No Efficiency factor 0–1. Default 0.80.

Leave Panel kWp blank to disable the forecast feature entirely (no forecast entities will be created).

  1. Click Submit — the integration reloads and the six forecast sensors appear in HA.

Using your HA home location

If you leave Latitude and Longitude blank, the integration uses hass.config.latitude and hass.config.longitude — the home location you set in Settings → System → General → Home Location. This is the recommended approach for most users.

You only need to override lat/lon if your panels are at a different location than your HA server (e.g. a remote farm installation).


Update frequency

Forecast data refreshes every 30 minutes. Open-Meteo updates its forecast model multiple times per day. The GHI/DNI/cloud/precipitation values reflect the current hour from the latest forecast run.


Accuracy notes

  • Open-Meteo uses the ICON, GFS or ERA5 weather model depending on your region
  • Forecast accuracy drops beyond 2 days — this integration only fetches 2 days
  • GHI-based yield estimation does not account for panel orientation, tilt angle or shading
  • Real output will be lower during high-temperature days (panels lose ~0.4%/°C above 25°C)
  • The performance ratio covers most real-world derating but is a static factor — it doesn't adjust dynamically for temperature

For a perfect forecast, pair this with Solcast (separate HACS integration) which provides rooftop-specific satellite-based forecasts.


Automation ideas

Boost charge current when tomorrow's forecast is poor

automation:
  - alias: "Boost charge when little sun forecast tomorrow"
    trigger:
      - platform: numeric_state
        entity_id: sensor.solar_forecast_tomorrow
        below: 5
        for: "00:10:00"
    action:
      - service: number.set_value
        target:
          entity_id: number.sunsynk_YOURSERIAL_setting_charge_current
        data:
          value: 100
    mode: single

Skip grid sell on cloudy days

automation:
  - alias: "Disable sell when cloudy"
    trigger:
      - platform: numeric_state
        entity_id: sensor.solar_forecast_cloud_cover
        above: 80
    action:
      - service: switch.turn_off
        target:
          entity_id: switch.sunsynk_YOURSERIAL_setting_solar_sell

Morning notification with today's forecast

automation:
  - alias: "Morning solar forecast notification"
    trigger:
      - platform: time
        at: "07:00:00"
    action:
      - service: notify.mobile_app_your_phone
        data:
          title: "Solar Forecast"
          message: >
            Today: {{ states('sensor.solar_forecast_today') }} kWh
            Tomorrow: {{ states('sensor.solar_forecast_tomorrow') }} kWh
            Cloud cover now: {{ states('sensor.solar_forecast_cloud_cover') }}%

Clone this wiki locally