mitch-dc / volkswagen_we_connect_id

Apache License 2.0
202 stars 53 forks source link

Problem after HA update #84

Closed renestegmaier closed 2 years ago

renestegmaier commented 2 years ago

Version of the custom_component

v0.0.13

Installation method (hacs / manual)

HACS

Installation method of hass (venv, docker, hassio,...)

supervised

Configuration


wich configuration file you need?

Describe the bug

After Update the HA System then bug occurs.

Debug log


Logger: homeassistant.config_entries
Source: custom_components/volkswagen_we_connect_id/__init__.py:41
Integration: Volkswagen We Connect ID ([documentation](https://github.com/mitch-dc/volkswagen_we_connect_id))
First occurred: 22:53:57 (2 occurrences)
Last logged: 22:57:56

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 365, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/config/custom_components/volkswagen_we_connect_id/__init__.py", line 41, in async_setup_entry
    await hass.async_add_executor_job(_we_connect.update)
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.10/site-packages/weconnect/weconnect.py", line 178, in update
    self.updateVehicles(updateCapabilities=updateCapabilities, updatePictures=updatePictures, force=force, selective=selective)
  File "/usr/local/lib/python3.10/site-packages/weconnect/weconnect.py", line 196, in updateVehicles
    vehicle = Vehicle(weConnect=self, vin=vin, parent=self.__vehicles, fromDict=vehicleDict, fixAPI=self.fixAPI,
  File "/usr/local/lib/python3.10/site-packages/weconnect/elements/vehicle.py", line 122, in __init__
    self.update(fromDict, updateCapabilities=updateCapabilities, updatePictures=updatePictures, selective=selective)
  File "/usr/local/lib/python3.10/site-packages/weconnect/elements/vehicle.py", line 216, in update
    self.updateStatus(updateCapabilities=updateCapabilities, force=force, selective=selective)
  File "/usr/local/lib/python3.10/site-packages/weconnect/elements/vehicle.py", line 322, in updateStatus
    self.domains[domain.value][key] = className(vehicle=self, parent=self.domains[domain.value], statusId=key,
  File "/usr/local/lib/python3.10/site-packages/weconnect/elements/warning_lights_status.py", line 30, in __init__
    super().__init__(vehicle=vehicle, parent=parent, statusId=statusId, fromDict=fromDict, fixAPI=fixAPI)
  File "/usr/local/lib/python3.10/site-packages/weconnect/elements/generic_status.py", line 38, in __init__
    self.update(fromDict=fromDict)
  File "/usr/local/lib/python3.10/site-packages/weconnect/elements/warning_lights_status.py", line 53, in update
    self.warningLights[warningLightDict['messageId']] = WarningLightsStatus.WarningLight(fromDict=warningLightDict,
  File "/usr/local/lib/python3.10/site-packages/weconnect/elements/warning_lights_status.py", line 100, in __init__
    self.update(fromDict)
  File "/usr/local/lib/python3.10/site-packages/weconnect/elements/warning_lights_status.py", line 113, in update
    self.priority.fromDict(fromDict, 'priority')
  File "/usr/local/lib/python3.10/site-packages/weconnect/addressable.py", line 300, in fromDict
    self.setValueWithCarTime(int(fromDict[key]), lastUpdateFromCar=None, fromServer=True)
ValueError: invalid literal for int() with base 10: ''