Prevent devices from being discovered twice
This commit is contained in:
1 parent
9db1a58cb1
commit
c2b8f8d34e
5 files changed
+26
-4
No files matched your search
@@ -86,7 +86,7 @@ def setup(hass, config):
|
||||
|
||||
switch = platform.device_discovered(hass, config, info)
|
||||
|
||||
if switch is not None:
|
||||
if switch is not None and switch not in switches.values():
|
||||
switch.entity_id = util.ensure_unique_string(
|
||||
ENTITY_ID_FORMAT.format(util.slugify(switch.get_name())),
|
||||
switches.keys())
|
||||
|
||||
Reference in new issue
Block a user