mirror of
https://github.com/home-assistant/core.git
synced 2026-09-27 18:08:37 -04:00
Bump accuweather to version 1.0.0 (#93305)
This commit is contained in:
@@ -41,7 +41,7 @@ async def init_integration(
|
||||
"homeassistant.components.accuweather.AccuWeather.async_get_current_conditions",
|
||||
return_value=current,
|
||||
), patch(
|
||||
"homeassistant.components.accuweather.AccuWeather.async_get_forecast",
|
||||
"homeassistant.components.accuweather.AccuWeather.async_get_daily_forecast",
|
||||
return_value=forecast,
|
||||
), patch(
|
||||
"homeassistant.components.accuweather.AccuWeather.requests_remaining",
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{
|
||||
"WeatherText": "Sunny",
|
||||
"WeatherIcon": 1,
|
||||
"HasPrecipitation": false,
|
||||
"PrecipitationType": null,
|
||||
|
||||
@@ -137,6 +137,11 @@
|
||||
"HoursOfSnowDay": 0.0,
|
||||
"HoursOfIceDay": 0.0,
|
||||
"CloudCoverDay": 58,
|
||||
"SolarIrradianceDay": {
|
||||
"Value": 7447.1,
|
||||
"Unit": "W/m\u00b2",
|
||||
"UnitType": 33
|
||||
},
|
||||
"IconNight": 41,
|
||||
"IconPhraseNight": "Partly cloudy w/ t-storms",
|
||||
"HasPrecipitationNight": true,
|
||||
@@ -197,7 +202,12 @@
|
||||
"HoursOfRainNight": 1.0,
|
||||
"HoursOfSnowNight": 0.0,
|
||||
"HoursOfIceNight": 0.0,
|
||||
"CloudCoverNight": 65
|
||||
"CloudCoverNight": 65,
|
||||
"SolarIrradianceNight": {
|
||||
"Value": 271.6,
|
||||
"Unit": "W/m\u00b2",
|
||||
"UnitType": 33
|
||||
}
|
||||
},
|
||||
{
|
||||
"Date": "2020-07-27T07:00:00+02:00",
|
||||
@@ -335,6 +345,11 @@
|
||||
"HoursOfSnowDay": 0.0,
|
||||
"HoursOfIceDay": 0.0,
|
||||
"CloudCoverDay": 52,
|
||||
"SolarIrradianceDay": {
|
||||
"Value": 7447.1,
|
||||
"Unit": "W/m\u00b2",
|
||||
"UnitType": 33
|
||||
},
|
||||
"IconNight": 36,
|
||||
"IconPhraseNight": "Intermittent clouds",
|
||||
"HasPrecipitationNight": false,
|
||||
@@ -393,7 +408,12 @@
|
||||
"HoursOfRainNight": 0.0,
|
||||
"HoursOfSnowNight": 0.0,
|
||||
"HoursOfIceNight": 0.0,
|
||||
"CloudCoverNight": 63
|
||||
"CloudCoverNight": 63,
|
||||
"SolarIrradianceNight": {
|
||||
"Value": 271.6,
|
||||
"Unit": "W/m\u00b2",
|
||||
"UnitType": 33
|
||||
}
|
||||
},
|
||||
{
|
||||
"Date": "2020-07-28T07:00:00+02:00",
|
||||
@@ -531,6 +551,11 @@
|
||||
"HoursOfSnowDay": 0.0,
|
||||
"HoursOfIceDay": 0.0,
|
||||
"CloudCoverDay": 65,
|
||||
"SolarIrradianceDay": {
|
||||
"Value": 7447.1,
|
||||
"Unit": "W/m\u00b2",
|
||||
"UnitType": 33
|
||||
},
|
||||
"IconNight": 36,
|
||||
"IconPhraseNight": "Intermittent clouds",
|
||||
"HasPrecipitationNight": false,
|
||||
@@ -589,7 +614,12 @@
|
||||
"HoursOfRainNight": 0.0,
|
||||
"HoursOfSnowNight": 0.0,
|
||||
"HoursOfIceNight": 0.0,
|
||||
"CloudCoverNight": 53
|
||||
"CloudCoverNight": 53,
|
||||
"SolarIrradianceNight": {
|
||||
"Value": 271.6,
|
||||
"Unit": "W/m\u00b2",
|
||||
"UnitType": 33
|
||||
}
|
||||
},
|
||||
{
|
||||
"Date": "2020-07-29T07:00:00+02:00",
|
||||
@@ -727,6 +757,11 @@
|
||||
"HoursOfSnowDay": 0.0,
|
||||
"HoursOfIceDay": 0.0,
|
||||
"CloudCoverDay": 45,
|
||||
"SolarIrradianceDay": {
|
||||
"Value": 7447.1,
|
||||
"Unit": "W/m\u00b2",
|
||||
"UnitType": 33
|
||||
},
|
||||
"IconNight": 34,
|
||||
"IconPhraseNight": "Mostly clear",
|
||||
"HasPrecipitationNight": false,
|
||||
@@ -785,7 +820,12 @@
|
||||
"HoursOfRainNight": 0.0,
|
||||
"HoursOfSnowNight": 0.0,
|
||||
"HoursOfIceNight": 0.0,
|
||||
"CloudCoverNight": 27
|
||||
"CloudCoverNight": 27,
|
||||
"SolarIrradianceNight": {
|
||||
"Value": 7447.1,
|
||||
"Unit": "W/m\u00b2",
|
||||
"UnitType": 33
|
||||
}
|
||||
},
|
||||
{
|
||||
"Date": "2020-07-30T07:00:00+02:00",
|
||||
@@ -923,6 +963,11 @@
|
||||
"HoursOfSnowDay": 0.0,
|
||||
"HoursOfIceDay": 0.0,
|
||||
"CloudCoverDay": 50,
|
||||
"SolarIrradianceDay": {
|
||||
"Value": 7447.1,
|
||||
"Unit": "W/m\u00b2",
|
||||
"UnitType": 33
|
||||
},
|
||||
"IconNight": 34,
|
||||
"IconPhraseNight": "Mostly clear",
|
||||
"HasPrecipitationNight": false,
|
||||
@@ -981,6 +1026,11 @@
|
||||
"HoursOfRainNight": 0.0,
|
||||
"HoursOfSnowNight": 0.0,
|
||||
"HoursOfIceNight": 0.0,
|
||||
"CloudCoverNight": 13
|
||||
"CloudCoverNight": 13,
|
||||
"SolarIrradianceNight": {
|
||||
"Value": 276.1,
|
||||
"Unit": "W/m\u00b2",
|
||||
"UnitType": 33
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -156,7 +156,7 @@ async def test_options_flow(hass: HomeAssistant) -> None:
|
||||
"accuweather/current_conditions_data.json"
|
||||
),
|
||||
), patch(
|
||||
"homeassistant.components.accuweather.AccuWeather.async_get_forecast"
|
||||
"homeassistant.components.accuweather.AccuWeather.async_get_daily_forecast"
|
||||
), patch(
|
||||
"homeassistant.components.accuweather.AccuWeather.requests_remaining",
|
||||
new_callable=PropertyMock,
|
||||
|
||||
@@ -19,7 +19,7 @@ async def test_entry_diagnostics(
|
||||
"current_conditions_data.json", "accuweather"
|
||||
)
|
||||
|
||||
coordinator_data["forecast"] = {}
|
||||
coordinator_data["forecast"] = []
|
||||
|
||||
result = await get_diagnostics_for_config_entry(hass, hass_client, entry)
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ async def test_update_interval_forecast(hass: HomeAssistant) -> None:
|
||||
"homeassistant.components.accuweather.AccuWeather.async_get_current_conditions",
|
||||
return_value=current,
|
||||
) as mock_current, patch(
|
||||
"homeassistant.components.accuweather.AccuWeather.async_get_forecast",
|
||||
"homeassistant.components.accuweather.AccuWeather.async_get_daily_forecast",
|
||||
return_value=forecast,
|
||||
) as mock_forecast:
|
||||
assert mock_current.call_count == 0
|
||||
|
||||
@@ -717,7 +717,7 @@ async def test_manual_update_entity(hass: HomeAssistant) -> None:
|
||||
"homeassistant.components.accuweather.AccuWeather.async_get_current_conditions",
|
||||
return_value=current,
|
||||
) as mock_current, patch(
|
||||
"homeassistant.components.accuweather.AccuWeather.async_get_forecast",
|
||||
"homeassistant.components.accuweather.AccuWeather.async_get_daily_forecast",
|
||||
return_value=forecast,
|
||||
) as mock_forecast, patch(
|
||||
"homeassistant.components.accuweather.AccuWeather.requests_remaining",
|
||||
|
||||
@@ -74,8 +74,8 @@ async def test_weather_with_forecast(hass: HomeAssistant) -> None:
|
||||
assert state.attributes.get(ATTR_ATTRIBUTION) == ATTRIBUTION
|
||||
forecast = state.attributes.get(ATTR_FORECAST)[0]
|
||||
assert forecast.get(ATTR_FORECAST_CONDITION) == "lightning-rainy"
|
||||
assert forecast.get(ATTR_FORECAST_PRECIPITATION) == 4.8
|
||||
assert forecast.get(ATTR_FORECAST_PRECIPITATION_PROBABILITY) == 58
|
||||
assert forecast.get(ATTR_FORECAST_PRECIPITATION) == 2.5
|
||||
assert forecast.get(ATTR_FORECAST_PRECIPITATION_PROBABILITY) == 60
|
||||
assert forecast.get(ATTR_FORECAST_TEMP) == 29.5
|
||||
assert forecast.get(ATTR_FORECAST_TEMP_LOW) == 15.4
|
||||
assert forecast.get(ATTR_FORECAST_TIME) == "2020-07-26T05:00:00+00:00"
|
||||
@@ -141,7 +141,7 @@ async def test_manual_update_entity(hass: HomeAssistant) -> None:
|
||||
"homeassistant.components.accuweather.AccuWeather.async_get_current_conditions",
|
||||
return_value=current,
|
||||
) as mock_current, patch(
|
||||
"homeassistant.components.accuweather.AccuWeather.async_get_forecast",
|
||||
"homeassistant.components.accuweather.AccuWeather.async_get_daily_forecast",
|
||||
return_value=forecast,
|
||||
) as mock_forecast, patch(
|
||||
"homeassistant.components.accuweather.AccuWeather.requests_remaining",
|
||||
|
||||
Reference in New Issue
Block a user