Improve config entry has already been setup error message (#117091)

This commit is contained in:
J. Nick Koston
2024-05-08 14:16:08 -05:00
committed by GitHub
parent 92b246fda9
commit 84a91a86a9
2 changed files with 12 additions and 2 deletions

View File

@@ -182,7 +182,10 @@ class EntityComponent(Generic[_EntityT]):
key = config_entry.entry_id
if key in self._platforms:
raise ValueError("Config entry has already been setup!")
raise ValueError(
f"Config entry {config_entry.title} ({key}) for "
f"{platform_type}.{self.domain} has already been setup!"
)
self._platforms[key] = self._async_init_entity_platform(
platform_type,