Prevent devices from being discovered twice

This commit is contained in:
Paulus Schoutsen committed 2015-01-10 10:34:56 -08:00
1 parent 9db1a58cb1
commit c2b8f8d34e
5 files changed
+26 -4

No files matched your search

+1 -1
View File
@@ -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())