mirror of
https://github.com/home-assistant/core.git
synced 2025-07-14 16:57:10 +00:00
Fix Airly if more than one config entry (#28498)
This commit is contained in:
parent
9b038bd10d
commit
4e40394972
@ -31,6 +31,8 @@ DEFAULT_SCAN_INTERVAL = timedelta(minutes=10)
|
|||||||
|
|
||||||
async def async_setup(hass: HomeAssistant, config: Config) -> bool:
|
async def async_setup(hass: HomeAssistant, config: Config) -> bool:
|
||||||
"""Set up configured Airly."""
|
"""Set up configured Airly."""
|
||||||
|
hass.data[DOMAIN] = {}
|
||||||
|
hass.data[DOMAIN][DATA_CLIENT] = {}
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
@ -49,8 +51,6 @@ async def async_setup_entry(hass, config_entry):
|
|||||||
if not airly.data:
|
if not airly.data:
|
||||||
raise ConfigEntryNotReady()
|
raise ConfigEntryNotReady()
|
||||||
|
|
||||||
hass.data[DOMAIN] = {}
|
|
||||||
hass.data[DOMAIN][DATA_CLIENT] = {}
|
|
||||||
hass.data[DOMAIN][DATA_CLIENT][config_entry.entry_id] = airly
|
hass.data[DOMAIN][DATA_CLIENT][config_entry.entry_id] = airly
|
||||||
|
|
||||||
hass.async_create_task(
|
hass.async_create_task(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user