mirror of
https://github.com/home-assistant/core.git
synced 2025-04-24 01:08:12 +00:00
Fix missing dew point and humidity in tomorrowio forecasts (#99793)
* Fix missing dew point and humidity in tomorrowio forecasts * Add assertion for correct parameters to realtime_and_all_forecasts method
This commit is contained in:
parent
432894a401
commit
b76ba002e2
@ -302,6 +302,8 @@ class TomorrowioDataUpdateCoordinator(DataUpdateCoordinator[dict[str, Any]]):
|
||||
[
|
||||
TMRW_ATTR_TEMPERATURE_LOW,
|
||||
TMRW_ATTR_TEMPERATURE_HIGH,
|
||||
TMRW_ATTR_DEW_POINT,
|
||||
TMRW_ATTR_HUMIDITY,
|
||||
TMRW_ATTR_WIND_SPEED,
|
||||
TMRW_ATTR_WIND_DIRECTION,
|
||||
TMRW_ATTR_CONDITION,
|
||||
|
@ -153,9 +153,66 @@ async def test_legacy_config_entry(hass: HomeAssistant) -> None:
|
||||
assert len(er.async_entries_for_config_entry(registry, entry.entry_id)) == 30
|
||||
|
||||
|
||||
async def test_v4_weather(hass: HomeAssistant) -> None:
|
||||
async def test_v4_weather(hass: HomeAssistant, tomorrowio_config_entry_update) -> None:
|
||||
"""Test v4 weather data."""
|
||||
weather_state = await _setup(hass, API_V4_ENTRY_DATA)
|
||||
|
||||
tomorrowio_config_entry_update.assert_called_with(
|
||||
[
|
||||
"temperature",
|
||||
"humidity",
|
||||
"pressureSeaLevel",
|
||||
"windSpeed",
|
||||
"windDirection",
|
||||
"weatherCode",
|
||||
"visibility",
|
||||
"pollutantO3",
|
||||
"windGust",
|
||||
"cloudCover",
|
||||
"precipitationType",
|
||||
"pollutantCO",
|
||||
"mepIndex",
|
||||
"mepHealthConcern",
|
||||
"mepPrimaryPollutant",
|
||||
"cloudBase",
|
||||
"cloudCeiling",
|
||||
"cloudCover",
|
||||
"dewPoint",
|
||||
"epaIndex",
|
||||
"epaHealthConcern",
|
||||
"epaPrimaryPollutant",
|
||||
"temperatureApparent",
|
||||
"fireIndex",
|
||||
"pollutantNO2",
|
||||
"pollutantO3",
|
||||
"particulateMatter10",
|
||||
"particulateMatter25",
|
||||
"grassIndex",
|
||||
"treeIndex",
|
||||
"weedIndex",
|
||||
"precipitationType",
|
||||
"pressureSurfaceLevel",
|
||||
"solarGHI",
|
||||
"pollutantSO2",
|
||||
"uvIndex",
|
||||
"uvHealthConcern",
|
||||
"windGust",
|
||||
],
|
||||
[
|
||||
"temperatureMin",
|
||||
"temperatureMax",
|
||||
"dewPoint",
|
||||
"humidity",
|
||||
"windSpeed",
|
||||
"windDirection",
|
||||
"weatherCode",
|
||||
"precipitationIntensityAvg",
|
||||
"precipitationProbability",
|
||||
],
|
||||
nowcast_timestep=60,
|
||||
location="80.0,80.0",
|
||||
)
|
||||
|
||||
assert weather_state.state == ATTR_CONDITION_SUNNY
|
||||
assert weather_state.attributes[ATTR_ATTRIBUTION] == ATTRIBUTION
|
||||
assert len(weather_state.attributes[ATTR_FORECAST]) == 14
|
||||
|
Loading…
x
Reference in New Issue
Block a user