mirror of
https://github.com/home-assistant/core.git
synced 2025-07-20 19:57:07 +00:00
parent
bf01b5a466
commit
8c41d0d3d7
@ -193,10 +193,15 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
try:
|
||||
await connection.async_setup()
|
||||
except socket.gaierror as ex:
|
||||
connection.async_stop()
|
||||
raise ConfigEntryNotReady(f"Could not resolve {host}: {ex}") from ex
|
||||
coordinator = LIFXUpdateCoordinator(hass, connection, entry.title)
|
||||
coordinator.async_setup()
|
||||
await coordinator.async_config_entry_first_refresh()
|
||||
try:
|
||||
await coordinator.async_config_entry_first_refresh()
|
||||
except ConfigEntryNotReady:
|
||||
connection.async_stop()
|
||||
raise
|
||||
|
||||
domain_data[entry.entry_id] = coordinator
|
||||
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
|
||||
|
Loading…
x
Reference in New Issue
Block a user