mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +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,24 +75,15 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
if not coordinator_forecast.last_update_success:
|
||||
raise ConfigEntryNotReady
|
||||
|
||||
# Check if rain forecast is available.
|
||||
if coordinator_forecast.data.position.get("rain_product_available") == 1:
|
||||
coordinator_rain = DataUpdateCoordinator(
|
||||
hass,
|
||||
_LOGGER,
|
||||
name=f"Météo-France rain for city {entry.title}",
|
||||
update_method=_async_update_data_rain,
|
||||
update_interval=SCAN_INTERVAL_RAIN,
|
||||
)
|
||||
await coordinator_rain.async_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,
|
||||
)
|
||||
# Check rain forecast.
|
||||
coordinator_rain = DataUpdateCoordinator(
|
||||
hass,
|
||||
_LOGGER,
|
||||
name=f"Météo-France rain for city {entry.title}",
|
||||
update_method=_async_update_data_rain,
|
||||
update_interval=SCAN_INTERVAL_RAIN,
|
||||
)
|
||||
await coordinator_rain.async_config_entry_first_refresh()
|
||||
|
||||
department = coordinator_forecast.data.position.get("dept")
|
||||
_LOGGER.debug(
|
||||
|
Loading…
x
Reference in New Issue
Block a user