Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 101645

"Entity id already exists" error, but the entity does not exist in any configuration file

$
0
0

@WoJWoJ wrote:

From Home Assistant log (ver. 0.105.4):

(...)
2020-02-16 22:15:03 INFO (SyncWorker_8) [homeassistant.loader] Loaded system_log from homeassistant.components.system_log
2020-02-16 22:15:03 INFO (MainThread) [homeassistant.bootstrap] Setting up {'logger', 'system_log'}
2020-02-16 22:15:03 INFO (MainThread) [homeassistant.setup] Setting up logger
2020-02-16 22:15:07 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 415, in _async_add_entity
    raise HomeAssistantError(msg)
homeassistant.exceptions.HomeAssistantError: Entity id already exists: switch.switch_2. Platform mqtt does not generate unique IDs
2020-02-16 22:15:07 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 415, in _async_add_entity
    raise HomeAssistantError(msg)
homeassistant.exceptions.HomeAssistantError: Entity id already exists: switch.switch_9. Platform mqtt does not generate unique IDs
2020-02-16 22:15:07 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 415, in _async_add_entity
    raise HomeAssistantError(msg)
homeassistant.exceptions.HomeAssistantError: Entity id already exists: switch.switch_2. Platform mqtt does not generate unique IDs

I tried to locate these switch_2 and switch_9 duplicate entries:

# find . -type f -exec grep -Hn "switch_2" {} \;                                                                                
./home-assistant.log:5:homeassistant.exceptions.HomeAssistantError: Entity id already exists: switch.switch_2. Platform mqtt does not generate unique IDs
./home-assistant.log:15:homeassistant.exceptions.HomeAssistantError: Entity id already exists: switch.switch_2. Platform mqtt does not generate unique IDs
./.storage/core.entity_registry:504:                "entity_id": "switch.switch_2",
./.storage/core.restore_state:861:                    "friendly_name": "switch_2",
./.storage/core.restore_state:869:                "entity_id": "switch.switch_2",
Binary file ./home-assistant_v2.db matches

It looks like it is registered only once in ./.storage/core.entity_registry. I have stopped HA, deleted core.* files and restarted HA → the output above is after that operation. (switch_9 is the same).

These names used to exist a long time ago (more than just these two) but are long gone and not present in any configuration.

Is this a bug?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 101645

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>