mitch-dc / volkswagen_we_connect_id

Apache License 2.0
189 stars 50 forks source link

Add non electric cars to the integration #226

Open KixMan28 opened 7 months ago

KixMan28 commented 7 months ago

Is your feature request related to a problem? Please describe. Please add non electric cars to the integration.

Describe the solution you'd like Please add combustion engine cars.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context I have a VW Touran with diesel engine. I have installed the Volkswagen app and I added my car to it. I have We connect and We Connect Plus services activated. I try to add it to HA with your integration and it gives an "Unexpected error".

See below several error messages from the log:

Logger: homeassistant.config_entries
Source: config_entries.py:402
First occurred: 12:02:52 (5 occurrences)
Last logged: 12:10:39

Error setting up entry Volkswagen We Connect ID for number
Error setting up entry Volkswagen We Connect ID for device_tracker
Error setting up entry Volkswagen We Connect ID for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 402, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/number/__init__.py", line 114, in async_setup_entry
    return await component.async_setup_entry(entry)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 195, in async_setup_entry
    return await self._platforms[key].async_setup_entry(config_entry)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 293, in async_setup_entry
    return await self._async_setup_platform(async_create_setup_task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 359, in _async_setup_platform
    await asyncio.shield(task)
asyncio.exceptions.CancelledError: aiohttp connection lost

Logger: homeassistant.config_entries
Source: config_entries.py:402
First occurred: 12:02:53 (2 occurrences)
Last logged: 12:10:39

Error setting up entry Volkswagen We Connect ID for volkswagen_we_connect_id
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 402, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/volkswagen_we_connect_id/__init__.py", line 81, in async_setup_entry
    await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1398, in async_forward_entry_setups
    await asyncio.gather(
asyncio.exceptions.CancelledError

Logger: weconnect
Source: /usr/local/lib/python3.11/site-packages/weconnect/elements/generic_status.py:81
First occurred: 12:02:04 (14 occurrences)
Last logged: 12:11:39

/vehicles/WVGZZZ1T7XXXXXXXX/domains/measurements/rangeStatus: Unknown attribute totalRange_km with value 660

Logger: weconnect
Source: /usr/local/lib/python3.11/site-packages/weconnect/elements/vehicle.py:356
First occurred: 12:02:04 (14 occurrences)
Last logged: 12:11:39

/vehicles/WVGZZZ1T7XXXXXXXX: Unknown attribute fuelLevelStatus with value {'value': {'carCapturedTimestamp': '2023-11-20T18:18:37Z', 'currentFuelLevel_pct': 80, 'primaryEngineType': 'diesel', 'carType': 'diesel'}} in domain measurements
/vehicles/WVGZZZ1T7XXXXXXXX: Unknown attribute fuelLevelStatus with value {'value': {'carCapturedTimestamp': '2023-11-21T11:09:07Z', 'currentFuelLevel_pct': 80, 'primaryEngineType': 'diesel', 'carType': 'diesel'}} in domain measurements
marcoboers commented 7 months ago

I get the same error although I do have an electric car (e-Golf).

Source: /usr/local/lib/python3.11/site-packages/weconnect/elements/vehicle.py:348

/vehicles/******: Unknown attribute fuelLevelStatus with value {'value': {'carCapturedTimestamp': '2023-11-21T07:56:18Z', 'currentSOC_pct': 72, 'primaryEngineType': 'electric', 'carType': 'electric'}} in domain measurements
KixMan28 commented 5 months ago

@mitch-dc Hi! Could you please reply to my request?

Thank you.