Hi,
I have moved two sensors from being connected to one Xiaomi gateway to another Xiaomi gateway. Now I’m getting the error “Entity id already exists” in the log file. Sometimes the sensors are showing as “unavailable” sometimes they are giving values, but I haven’t been able to see a clear pattern. The sensors are a temperature/humidity/pressure sensor (158d0003d45086) and a motion sensor (158d0004470bb2), as can be seen in the log file below.
Both gateways are connected to the network and sensors, which have not been moved between gateways, are working fine. In the Xiaomi app the two sensors are shown correctly as children to the new gateway and they are connected and giving values as expected.
I assume that there is an old unique ID stuck somewhere in a configuration file and maybe being linked to the original gateway, but I’m simply unable to find it. I have checked in .storage\core.entity_registry
but each sensor is only listed once.
Any help would be appreciated.
Thanks,
Dan
home-assistant.log:
2020-01-12 17:17:50 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 399, in _async_add_entity
raise HomeAssistantError(msg)
homeassistant.exceptions.HomeAssistantError: Entity id already exists: binary_sensor.motion_sensor_158d0004470bb2. Platform xiaomi_aqara does not generate unique IDs
2020-01-12 17:17:51 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 399, in _async_add_entity
raise HomeAssistantError(msg)
homeassistant.exceptions.HomeAssistantError: Entity id already exists: sensor.pressure_158d0003d45086. Platform xiaomi_aqara does not generate unique IDs
2020-01-12 17:17:51 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 399, in _async_add_entity
raise HomeAssistantError(msg)
homeassistant.exceptions.HomeAssistantError: Entity id already exists: sensor.humidity_158d0003d45086. Platform xiaomi_aqara does not generate unique IDs
2020-01-12 17:17:51 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 399, in _async_add_entity
raise HomeAssistantError(msg)
homeassistant.exceptions.HomeAssistantError: Entity id already exists: sensor.temperature_158d0003d45086. Platform xiaomi_aqara does not generate unique IDs
2020-01-12 17:17:54 WARNING (MainThread) [homeassistant.core] Unable to remove unknown listener <function async_track_point_in_utc_time.<locals>.point_in_time_listener at 0xb22dee88>
2020-01-12 17:17:56 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/storage.py", line 178, in _async_callback_delayed_write
await self._async_handle_write_data()
File "/usr/src/homeassistant/homeassistant/helpers/storage.py", line 190, in _async_handle_write_data
if "data_func" in data:
TypeError: argument of type 'NoneType' is not iterable