fordpass-ha icon indicating copy to clipboard operation
fordpass-ha copied to clipboard

Platform fordpass does not generate unique IDs

Open dregini opened this issue 1 year ago • 10 comments

Hi, I keep getting this errors: Platform fordpass does not generate unique IDs. ID XXXX-fordpass_doorlock already exists - ignoring lock.fordpass_doorlock

Am I doing something wrong? I've tried multiple time to remove the car and then re adding it. Thank's Diego

dregini avatar Oct 06 '23 14:10 dregini

Hey @dregini, are you still having this issue?

SquidBytes avatar Oct 26 '23 02:10 SquidBytes

Hi, Yes i just tried to update the plugin with HACS and then readded the car and I still have the problem. edit: This time I also found in the log this error:

Error while setting up fordpass platform for sensor

Traceback (most recent call last):
  File "/lsiopy/lib/python3.11/site-packages/homeassistant/helpers/entity_platform.py", line 367, in _async_setup_platform
    await asyncio.gather(*pending)
  File "/lsiopy/lib/python3.11/site-packages/homeassistant/helpers/entity_platform.py", line 507, in async_add_entities
    await asyncio.gather(*tasks)
  File "/lsiopy/lib/python3.11/site-packages/homeassistant/helpers/entity_platform.py", line 563, in _async_add_entity
    entity.add_to_platform_start(
  File "/lsiopy/lib/python3.11/site-packages/homeassistant/components/sensor/__init__.py", line 189, in add_to_platform_start
    super().add_to_platform_start(hass, platform, parallel_updates)
  File "/lsiopy/lib/python3.11/site-packages/homeassistant/helpers/entity.py", line 1025, in add_to_platform_start
    raise HomeAssistantError(
homeassistant.exceptions.HomeAssistantError: Entity sensor.fordpass_fuel cannot be added a second time to an entity platform

Is it possible that I have some old data from previus test? Is there a way to check or delete old data? (I'm kinda new to homeassistant)

dregini avatar Oct 26 '23 06:10 dregini

This may be fixed the upcoming release 1.61 Please report back in after updating to that once its released

SquidBytes avatar Oct 30 '23 20:10 SquidBytes

Hi, i just updated to 1.61, but I'm still getting the error when i try to add a vehicle.

This is the first of many log error:

Error adding entities for domain sensor with platform fordpass

Traceback (most recent call last):
  File "/lsiopy/lib/python3.11/site-packages/homeassistant/helpers/entity_platform.py", line 507, in async_add_entities
    await asyncio.gather(*tasks)
  File "/lsiopy/lib/python3.11/site-packages/homeassistant/helpers/entity_platform.py", line 563, in _async_add_entity
    entity.add_to_platform_start(
  File "/lsiopy/lib/python3.11/site-packages/homeassistant/components/sensor/__init__.py", line 215, in add_to_platform_start
    super().add_to_platform_start(hass, platform, parallel_updates)
  File "/lsiopy/lib/python3.11/site-packages/homeassistant/helpers/entity.py", line 991, in add_to_platform_start
    raise HomeAssistantError(
homeassistant.exceptions.HomeAssistantError: Entity sensor.fordpass_fuel cannot be added a second time to an entity platform

dregini avatar Nov 02 '23 13:11 dregini

So the error is from HomeAssistant when it tried to create the sensor.fordpass_fuel entity, but it already exists.

Do you have a sensor.fordpass_fuel entity? If you do - is it updated with your vehicles information? Do you have another sensor with the same name?

SquidBytes avatar Nov 02 '23 15:11 SquidBytes

Hi, from the ui I do not see duplicates, but the information do not update. If I remove the car and re-add it the data update but in the log I see the usual errors.

But I just discover that if I remove/add the car and then open the history I can see data from my first attempts 1 month ago so I'm thinking something do not delete from the database when I remove the car... There is any way to check?

dregini avatar Nov 03 '23 08:11 dregini

Mine does the same thing no matter the name...

2023-11-22 19:39:09.575 ERROR (MainThread) [homeassistant.components.sensor] Error adding entities for domain sensor with platform fordpass
Traceback (most recent call last):
  File "/opt/homeassistant/3.11.4/lib/python3.11/site-packages/homeassistant/helpers/entity_platform.py", line 507, in async_add_entities
    await asyncio.gather(*tasks)
  File "/opt/homeassistant/3.11.4/lib/python3.11/site-packages/homeassistant/helpers/entity_platform.py", line 563, in _async_add_entity
    entity.add_to_platform_start(
  File "/opt/homeassistant/3.11.4/lib/python3.11/site-packages/homeassistant/components/sensor/__init__.py", line 215, in add_to_platform_start
    super().add_to_platform_start(hass, platform, parallel_updates)
  File "/opt/homeassistant/3.11.4/lib/python3.11/site-packages/homeassistant/helpers/entity.py", line 991, in add_to_platform_start
    raise HomeAssistantError(
homeassistant.exceptions.HomeAssistantError: Entity sensor.raptor_fuel_2 cannot be added a second time to an entity platform
2023-11-22 19:39:09.581 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up fordpass platform for sensor
Traceback (most recent call last):
  File "/opt/homeassistant/3.11.4/lib/python3.11/site-packages/homeassistant/helpers/entity_platform.py", line 367, in _async_setup_platform
    await asyncio.gather(*pending)
  File "/opt/homeassistant/3.11.4/lib/python3.11/site-packages/homeassistant/helpers/entity_platform.py", line 507, in async_add_entities
    await asyncio.gather(*tasks)
  File "/opt/homeassistant/3.11.4/lib/python3.11/site-packages/homeassistant/helpers/entity_platform.py", line 563, in _async_add_entity
    entity.add_to_platform_start(
  File "/opt/homeassistant/3.11.4/lib/python3.11/site-packages/homeassistant/components/sensor/__init__.py", line 215, in add_to_platform_start
    super().add_to_platform_start(hass, platform, parallel_updates)
  File "/opt/homeassistant/3.11.4/lib/python3.11/site-packages/homeassistant/helpers/entity.py", line 991, in add_to_platform_start
    raise HomeAssistantError(
homeassistant.exceptions.HomeAssistantError: Entity sensor.raptor_fuel_2 cannot be added a second time to an entity platform

theOrakle avatar Nov 23 '23 01:11 theOrakle

same here...

Logger: homeassistant.components.sensor Source: helpers/entity_platform.py:610 Integration: Sensor (documentation, issues) First occurred: 21:03:27 (18 occurrences) Last logged: 21:03:30

Platform fordpass does not generate unique IDs. ID WF0FXXWPMFLSXXXXX-fordpass_remoteStartStatus already exists - ignoring sensor.fordpass_remotestartstatus Platform fordpass does not generate unique IDs. ID WF0FXXWPMFLSXXXXX-fordpass_messages already exists - ignoring sensor.fordpass_messages Platform fordpass does not generate unique IDs. ID WF0FXXWPMFLSXXXXX-fordpass_dieselSystemStatus already exists - ignoring sensor.fordpass_dieselsystemstatus Platform fordpass does not generate unique IDs. ID WF0FXXWPMFLSXXXXX-fordpass_exhaustFluidLevel already exists - ignoring sensor.fordpass_exhaustfluidlevel Platform fordpass does not generate unique IDs. ID WF0FXXWPMFLSXXXXX-fordpass_odometer already exists - ignoring sensor.fordpass_odometer

elbman avatar Nov 27 '23 20:11 elbman

Same here.

Initial sensor state OK but no more sensor updates after that. Debug logging shows me the full key-value dict it received from the API and a success message.

2024-01-11 09:01:14.478 DEBUG (MainThread) [custom_components.fordpass] Finished fetching fordpass data in 2.959 seconds (success: True)

Core version: 2024.1.2 Fordpass version: 1.66

Logger: homeassistant.components.sensor Source: helpers/entity_platform.py:610 Integration: Sensor (documentation, issues) First occurred: 10 januari 2024 om 10:39:12 (162 occurrences) Last logged: 10:44:14

Platform fordpass does not generate unique IDs. ID WF0UXXWPGUMP12244-fordpass_remoteStartStatus already exists - ignoring sensor.fordpass_remotestartstatus Platform fordpass does not generate unique IDs. ID WF0UXXWPGUMP12244-fordpass_messages already exists - ignoring sensor.fordpass_messages Platform fordpass does not generate unique IDs. ID WF0UXXWPGUMP12244-fordpass_dieselSystemStatus already exists - ignoring sensor.fordpass_dieselsystemstatus Platform fordpass does not generate unique IDs. ID WF0UXXWPGUMP12244-fordpass_exhaustFluidLevel already exists - ignoring sensor.fordpass_exhaustfluidlevel Platform fordpass does not generate unique IDs. ID WF0UXXWPGUMP12244-fordpass_odometer already exists - ignoring sensor.fordpass_odometer

tizzen33 avatar Jan 11 '24 09:01 tizzen33

Same here, 2 errors er logged each time HA restarts:

Logger: homeassistant.components.sensor Source: helpers/entity_platform.py:507 Integration: Sensor (documentation, issues) First occurred: 13:11:36 (1 occurrences) Last logged: 13:11:36

Error adding entities for domain sensor with platform fordpass Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 507, in async_add_entities await asyncio.gather(*tasks) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 563, in _async_add_entity entity.add_to_platform_start( File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 239, in add_to_platform_start super().add_to_platform_start(hass, platform, parallel_updates) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1250, in add_to_platform_start raise HomeAssistantError( homeassistant.exceptions.HomeAssistantError: Entity 'sensor.fordpass_fuel' cannot be added a second time to an entity platform

Logger: homeassistant.components.sensor Source: helpers/entity_platform.py:368 Integration: Sensor (documentation, issues) First occurred: 13:11:36 (1 occurrences) Last logged: 13:11:36

Error while setting up fordpass platform for sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 368, in _async_setup_platform await asyncio.gather(*pending) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 507, in async_add_entities await asyncio.gather(*tasks) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 563, in _async_add_entity entity.add_to_platform_start( File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 239, in add_to_platform_start super().add_to_platform_start(hass, platform, parallel_updates) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1250, in add_to_platform_start raise HomeAssistantError( homeassistant.exceptions.HomeAssistantError: Entity 'sensor.fordpass_fuel' cannot be added a second time to an entity platform

Core 2024.1.6 Supervisor 2024.01.1 Operating System 11.4 Frontend 20240104.0 Fordpass 1.66 installed via HACS

jath58 avatar Feb 06 '24 12:02 jath58