Fix bug in init preventing some discovery (#22)

This commit is contained in:
Vincent Le Bourlot 2022-04-27 20:45:41 +02:00 committed by GitHub
parent 565321b1c2
commit a87ff4cf29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -62,7 +62,7 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> b
for p, vs_p in PLATFORMS.items(): for p, vs_p in PLATFORMS.items():
hass.data[DOMAIN][config_entry.entry_id][vs_p] = [] hass.data[DOMAIN][config_entry.entry_id][vs_p] = []
if device_dict[VS_SWITCHES]: if device_dict[vs_p]:
hass.data[DOMAIN][config_entry.entry_id][vs_p].extend(device_dict[vs_p]) hass.data[DOMAIN][config_entry.entry_id][vs_p].extend(device_dict[vs_p])
hass.async_create_task(forward_setup(config_entry, p)) hass.async_create_task(forward_setup(config_entry, p))