mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Remove check for obsolete "rain_product_available" in meteo_france (#128533)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
This commit is contained in:
parent
0b4e3c3db5
commit
4ef629f79d
@ -75,8 +75,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||||||
if not coordinator_forecast.last_update_success:
|
if not coordinator_forecast.last_update_success:
|
||||||
raise ConfigEntryNotReady
|
raise ConfigEntryNotReady
|
||||||
|
|
||||||
# Check if rain forecast is available.
|
# Check rain forecast.
|
||||||
if coordinator_forecast.data.position.get("rain_product_available") == 1:
|
|
||||||
coordinator_rain = DataUpdateCoordinator(
|
coordinator_rain = DataUpdateCoordinator(
|
||||||
hass,
|
hass,
|
||||||
_LOGGER,
|
_LOGGER,
|
||||||
@ -84,15 +83,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||||||
update_method=_async_update_data_rain,
|
update_method=_async_update_data_rain,
|
||||||
update_interval=SCAN_INTERVAL_RAIN,
|
update_interval=SCAN_INTERVAL_RAIN,
|
||||||
)
|
)
|
||||||
await coordinator_rain.async_refresh()
|
await coordinator_rain.async_config_entry_first_refresh()
|
||||||
|
|
||||||
if not coordinator_rain.last_update_success:
|
|
||||||
raise ConfigEntryNotReady
|
|
||||||
else:
|
|
||||||
_LOGGER.warning(
|
|
||||||
"1 hour rain forecast not available. %s is not in covered zone",
|
|
||||||
entry.title,
|
|
||||||
)
|
|
||||||
|
|
||||||
department = coordinator_forecast.data.position.get("dept")
|
department = coordinator_forecast.data.position.get("dept")
|
||||||
_LOGGER.debug(
|
_LOGGER.debug(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user