Forecast.Solar remaining energy production today

Hello,

It would be great if we could fetch the remaining energy production for today from Forecast.Solar.

I have already prepared that, but I am waiting for new release of python module forecast-solar.

Once new version of forecast-solar is released:

diff --git a/homeassistant/components/forecast_solar/const.py b/homeassistant/components/forecast_solar/const.py
index c7663d6cf3..df7845d602 100644
--- a/homeassistant/components/forecast_solar/const.py
+++ b/homeassistant/components/forecast_solar/const.py
@@ -26,6 +26,13 @@ SENSORS: tuple[ForecastSolarSensorEntityDescription, ...] = (
         device_class=SensorDeviceClass.ENERGY,
         native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
     ),
+    ForecastSolarSensorEntityDescription(
+        key="energy_production_today_remaining",
+        name="Estimated energy production - remaining today",
+        state=lambda estimate: estimate.energy_production_today_remaining / 1000,
+        device_class=SensorDeviceClass.ENERGY,
+        native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
+    ),
     ForecastSolarSensorEntityDescription(
         key="energy_production_tomorrow",
         name="Estimated energy production - tomorrow",
diff --git a/homeassistant/components/forecast_solar/diagnostics.py b/homeassistant/components/forecast_solar/diagnostics.py
index 7fdcd22d0f..c3d9e919b7 100644
--- a/homeassistant/components/forecast_solar/diagnostics.py
+++ b/homeassistant/components/forecast_solar/diagnostics.py
@@ -34,6 +34,7 @@ async def async_get_config_entry_diagnostics(
         },
         "data": {
             "energy_production_today": coordinator.data.energy_production_today,
+            "energy_production_today_remaining": coordinator.data.energy_production_today_remaining,
             "energy_production_tomorrow": coordinator.data.energy_production_tomorrow,
             "energy_current_hour": coordinator.data.energy_current_hour,
             "power_production_now": coordinator.data.power_production_now,
diff --git a/homeassistant/components/forecast_solar/manifest.json b/homeassistant/components/forecast_solar/manifest.json
index 0b9abb5f45..e0e41feb08 100644
--- a/homeassistant/components/forecast_solar/manifest.json
+++ b/homeassistant/components/forecast_solar/manifest.json
@@ -7,5 +7,5 @@
   "integration_type": "service",
   "iot_class": "cloud_polling",
   "quality_scale": "platinum",
-  "requirements": ["forecast_solar==2.2.0"]
+  "requirements": ["forecast_solar==2.4.0"]
 }
1 Like

When do you think it will be released?

Is there a way to compile it into the system for not waiting a release?

You don’t have much patience do you? :sweat_smile:

Next Wednesday is the May release of Home Assistant and it contains the changes from @koleo9am.