Dependency upgrade to forecast-solar 3.0.0 (#91951)

This commit is contained in:
Ondřej Kolenatý 2023-04-24 19:18:18 +02:00 committed by GitHub
parent f104bba683
commit 36f90cda92
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 9 additions and 9 deletions

View file

@ -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": {

View file

@ -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()
}
}

View file

@ -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"]
}

View file

@ -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

View file

@ -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

View file

@ -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,
}

View file

@ -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,
},

View file

@ -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,
}