Pass a helpful name when creating common asyncio tasks in core (#89171)

This commit is contained in:
J. Nick Koston
2023-03-05 01:46:02 -10:00
committed by GitHub
parent 927b43626c
commit 11681f3f31
23 changed files with 169 additions and 61 deletions

View File

@@ -131,7 +131,10 @@ class EntityComponent(Generic[_EntityT]):
# Look in config for Domain, Domain 2, Domain 3 etc and load them
for p_type, p_config in config_per_platform(config, self.domain):
if p_type is not None:
self.hass.async_create_task(self.async_setup_platform(p_type, p_config))
self.hass.async_create_task(
self.async_setup_platform(p_type, p_config),
f"EntityComponent setup platform {p_type} {self.domain}",
)
# Generic discovery listener for loading platform dynamically
# Refer to: homeassistant.helpers.discovery.async_load_platform()