we# HA SunForecast Plus Integration
SunForecast Plus is a custom Home Assistant integration designed to provide more accurate solar production forecasts using weather data from Open-Meteo.
Unlike other forecast integrations, SunForecast Plus introduces a second-level correction based on cloud cover percentage. Even small clouds can drastically reduce your solar production, so this integration applies a correction factor to account for cloud impact.
The integration uses the cloud_cover_total metric from Open-Meteo to adjust the expected solar output.
As shown below, different weather models (like Meteo-France or GFS) interpret 100% cloud cover differently:
Tip: Use the "lowest bidder" (e.g. gfs_graphcast025) and adjust the correction intensity with the cloud_correction_factor. A value of 0 disables cloud correction, while 1 applies full correction based on cloud cover.
You can test available models for your location here.
- Go to the HACS page in your Home Assistant instance.
- Click on
Integrations. - Click on the three dots in the top right corner.
- Click on
Custom repositories. - Add
chourmovs/ha-sunforecast-plusas the repository URL. - Click on
Categoryand selectIntegration. - Click on
Add. - A new custom integration shows up for installation "SunForecast Plus", install it.
- Restart Home Assistant.
- Download the latest release.
- Unpack the release and copy the
custom_components/sunforecast_plusdirectory to thecustom_componentsdirectory in your Home Assistant configuration directory. - Restart Home Assistant.
To use this integration in your installation, head to "Settings" in the Home Assistant UI, then "Integrations". Click on the plus button and search for "Sun Forecast Plus" and follow the instructions.
Configuration part 1:
Configuration part 2:
Tip To see the cloud-cover correction in action, activate the specific log in your configuration.yaml
logger:
default: info
logs:
custom_components.ha_sunforecast_plus: debug
custom_components.ha_sunforecast_plus.data_update_coordinator: debug
Optional: Display Logs in your dashboard using Lovelace Card
You can display recent adjustment logs using a markdown card in your dashboard. Here's an example: (after having activated specific log as above)
type: markdown
title: Logs ha_sunforecast_plus
content: >
```text
{% set log_lines = state_attr('sensor.solar_production_forecast_ha_sunforecast_logs', 'log_lines') %}
{% if log_lines %}
{% for line in log_lines %}
{{ line.split("Day adjustment -")[1] }}
{% endfor %}
{% else %}
No logs available.
{% endif %}This should be left blank as the Open-Meteo API does not require an API key. An API key is required for commercial use only per-Open-Meteo's terms of service.
The azimuth range for this integration is 0 to 360 degrees, with 0 being North, 90 being East, 180 being South, and 270 being West. If you have a negative azimuth, add 360 to it to get the correct value. For example, -90 degrees should be entered as 270 degrees.
The DC efficiency is the efficiency of the DC wiring and should not be confused with the cell efficiency. The DC efficiency is typically around 0.93. The cell efficiency is accounted for in the cell temperature calculation and is assumed to be 0.12.
The power sensors start with "Solar production forecast Estimated power" and the energy sensors start with "Solar production forecast Estimated energy". The power sensors show the power expected to be available at that time, and the energy sensors show the energy expected to be produced as an average over an hour.
Some sensors are disabled by default to reduce load on the recorder database. If you want one of these sensors, you can enable it and wait about a minute for sensor data to appear.
The power sensors update every 15 minutes, so you may not see immediate changes in the power sensors. They are not interpolated every minute. For example, consider that the integration knows that the power values will be as follows for the given instants:
12:00:100W12:15:200W12:30:300W
If you check the "Power Now" sensor at:
12:00, it will show100W (data taken from12:00)12:15, it will show200W (data taken from12:15)12:22, it will show200W (data taken from12:15)12:37, it will show300W (data taken from12:30)
Notice that the power sensor picks the last known value until the next update, not necessarily the closest value. Also, the power sensors are not interpolated, so the "Power Now" sensor will not show ~150 W at 12:07.
This project was initially a fork of rany2/ha-open-meteo-solar-forecast for personal use, when I realised that improvement proposed was a nice step forward and needed their own life.
The forecast_solar component code was used as a base for this integration. Thanks for such a clean starting point!
If you find this integration useful and want to support its development, consider




