diff --git a/homeassistant/components/forecast_solar/diagnostics.py b/homeassistant/components/forecast_solar/diagnostics.py index 7fdcd22d0fc..d14136103a4 100644 --- a/homeassistant/components/forecast_solar/diagnostics.py +++ b/homeassistant/components/forecast_solar/diagnostics.py @@ -45,9 +45,9 @@ async def async_get_config_entry_diagnostics( wh_datetime.isoformat(): wh_value for wh_datetime, wh_value in coordinator.data.wh_days.items() }, - "wh_hours": { + "wh_period": { wh_datetime.isoformat(): wh_value - for wh_datetime, wh_value in coordinator.data.wh_hours.items() + for wh_datetime, wh_value in coordinator.data.wh_period.items() }, }, "account": { diff --git a/homeassistant/components/forecast_solar/energy.py b/homeassistant/components/forecast_solar/energy.py index 33537396330..b2e9b51473b 100644 --- a/homeassistant/components/forecast_solar/energy.py +++ b/homeassistant/components/forecast_solar/energy.py @@ -16,6 +16,6 @@ async def async_get_solar_forecast( return { "wh_hours": { timestamp.isoformat(): val - for timestamp, val in coordinator.data.wh_hours.items() + for timestamp, val in coordinator.data.wh_period.items() } } diff --git a/homeassistant/components/forecast_solar/manifest.json b/homeassistant/components/forecast_solar/manifest.json index 0b9abb5f45c..ac6a3f7c308 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==3.0.0"] } diff --git a/requirements_all.txt b/requirements_all.txt index 4c110a17359..3ff2d210c5e 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -739,7 +739,7 @@ fnv-hash-fast==0.3.1 foobot_async==1.0.0 # homeassistant.components.forecast_solar -forecast_solar==2.2.0 +forecast_solar==3.0.0 # homeassistant.components.fortios fortiosapi==1.0.5 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index a62514a4525..0a30ddeb364 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -570,7 +570,7 @@ fnv-hash-fast==0.3.1 foobot_async==1.0.0 # homeassistant.components.forecast_solar -forecast_solar==2.2.0 +forecast_solar==3.0.0 # homeassistant.components.freebox freebox-api==1.1.0 diff --git a/tests/components/forecast_solar/conftest.py b/tests/components/forecast_solar/conftest.py index 007a6b7d2ae..26c1ae7ba36 100644 --- a/tests/components/forecast_solar/conftest.py +++ b/tests/components/forecast_solar/conftest.py @@ -99,7 +99,7 @@ def mock_forecast_solar(hass) -> Generator[None, MagicMock, None]: datetime(2021, 6, 27, 13, 0, tzinfo=dt_util.DEFAULT_TIME_ZONE): 20, datetime(2022, 6, 27, 13, 0, tzinfo=dt_util.DEFAULT_TIME_ZONE): 200, } - estimate.wh_hours = { + estimate.wh_period = { datetime(2021, 6, 27, 13, 0, tzinfo=dt_util.DEFAULT_TIME_ZONE): 30, datetime(2022, 6, 27, 13, 0, tzinfo=dt_util.DEFAULT_TIME_ZONE): 300, } diff --git a/tests/components/forecast_solar/test_diagnostics.py b/tests/components/forecast_solar/test_diagnostics.py index 6bb4c3c5780..4ef25379497 100644 --- a/tests/components/forecast_solar/test_diagnostics.py +++ b/tests/components/forecast_solar/test_diagnostics.py @@ -45,7 +45,7 @@ async def test_diagnostics( "2021-06-27T13:00:00-07:00": 20, "2022-06-27T13:00:00-07:00": 200, }, - "wh_hours": { + "wh_period": { "2021-06-27T13:00:00-07:00": 30, "2022-06-27T13:00:00-07:00": 300, }, diff --git a/tests/components/forecast_solar/test_energy.py b/tests/components/forecast_solar/test_energy.py index 9ab6038818b..3ca89d33faa 100644 --- a/tests/components/forecast_solar/test_energy.py +++ b/tests/components/forecast_solar/test_energy.py @@ -15,7 +15,7 @@ async def test_energy_solar_forecast( mock_forecast_solar: MagicMock, ) -> None: """Test the Forecast.Solar energy platform solar forecast.""" - mock_forecast_solar.estimate.return_value.wh_hours = { + mock_forecast_solar.estimate.return_value.wh_period = { datetime(2021, 6, 27, 13, 0, tzinfo=timezone.utc): 12, datetime(2021, 6, 27, 14, 0, tzinfo=timezone.utc): 8, }