Remove unique ID from netatmo (#12317)
* Remove unique ID from netatmo * Shame platform in error message
This commit is contained in:
1 parent
f28fa7447e
commit
2e3524147c
4 files changed
+5
-21
No files matched your search
@@ -240,8 +240,12 @@ class EntityPlatform(object):
|
||||
raise HomeAssistantError(
|
||||
'Invalid entity id: {}'.format(entity.entity_id))
|
||||
elif entity.entity_id in component_entities:
|
||||
msg = 'Entity id already exists: {}'.format(entity.entity_id)
|
||||
if entity.unique_id is not None:
|
||||
msg += '. Platform {} does not generate unique IDs'.format(
|
||||
self.platform_name)
|
||||
raise HomeAssistantError(
|
||||
'Entity id already exists: {}'.format(entity.entity_id))
|
||||
msg)
|
||||
|
||||
self.entities[entity.entity_id] = entity
|
||||
component_entities.add(entity.entity_id)
|
||||
|
||||
Reference in new issue
Block a user