@@ -190,12 +190,11 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
|
|||||||
}
|
}
|
||||||
|
|
||||||
async def setup_entities():
|
async def setup_entities():
|
||||||
|
platforms = set(entity[CONF_PLATFORM] for entity in entry.data[CONF_ENTITIES])
|
||||||
await asyncio.gather(
|
await asyncio.gather(
|
||||||
*[
|
*[
|
||||||
hass.config_entries.async_forward_entry_setup(
|
hass.config_entries.async_forward_entry_setup(entry, platform)
|
||||||
entry, entity[CONF_PLATFORM]
|
for platform in platforms
|
||||||
)
|
|
||||||
for entity in entry.data[CONF_ENTITIES]
|
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
device.connect()
|
device.connect()
|
||||||
|
Reference in New Issue
Block a user