Fix Overkiz startup order to prevent unnamed device showing up (#76695)

Gateways should be added first, before platform setup
pull/76964/head
Mick Vleeshouwer 2022-08-16 07:54:26 +02:00 committed by Paulus Schoutsen
parent 1f13e332ac
commit 8e9313840e
1 changed files with 2 additions and 2 deletions

View File

@ -111,8 +111,6 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
) or OVERKIZ_DEVICE_TO_PLATFORM.get(device.ui_class):
platforms[platform].append(device)
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
device_registry = dr.async_get(hass)
for gateway in setup.gateways:
@ -128,6 +126,8 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
configuration_url=server.configuration_url,
)
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
return True