mirror of
https://github.com/esphome/esphome.git
synced 2025-01-03 11:21:43 +01:00
Don't generate IDs with the name of loaded integrations (#2373)
This commit is contained in:
parent
ed3ad615d8
commit
0406e27100
1 changed files with 1 additions and 1 deletions
|
@ -312,7 +312,7 @@ class ID:
|
||||||
if self.id is None:
|
if self.id is None:
|
||||||
base = str(self.type).replace("::", "_").lower()
|
base = str(self.type).replace("::", "_").lower()
|
||||||
name = "".join(c for c in base if c.isalnum() or c == "_")
|
name = "".join(c for c in base if c.isalnum() or c == "_")
|
||||||
used = set(registered_ids) | set(RESERVED_IDS)
|
used = set(registered_ids) | set(RESERVED_IDS) | CORE.loaded_integrations
|
||||||
self.id = ensure_unique_string(name, used)
|
self.id = ensure_unique_string(name, used)
|
||||||
return self.id
|
return self.id
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue