G-Two / homeassistant-subaru

Subaru STARLINK custom component for Home Assistant.
Apache License 2.0
54 stars 6 forks source link

Error prevented the integration from working at all until it was reloaded. #125

Open jharris4 opened 3 weeks ago

jharris4 commented 3 weeks ago

I noticed today that none of the Subaru functionality was working properly. All the entities related to it said unavailable.

I was only able to fix it by reloading the integration manually.

I checked the logs, and the following error was reported:

Logger: homeassistant.config_entries
Source: config_entries.py:594
First occurred: June 10, 2024 at 10:29:22 PM (1 occurrences)
Last logged: June 10, 2024 at 10:29:22 PM

Error setting up entry <redacted_email>@gmail.com for subaru
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/subaru/__init__.py", line 102, in async_setup_entry
    vehicles[vin] = await _get_vehicle_info(controller, vin)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/subaru/__init__.py", line 210, in _get_vehicle_info
    VEHICLE_HAS_LOCK_STATUS: await controller.has_lock_status(vin),
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/subarulink/controller.py", line 334, in has_lock_status
    await self.get_data(vin)
  File "/usr/local/lib/python3.12/site-packages/subarulink/controller.py", line 448, in get_data
    await self.fetch(vin)
  File "/usr/local/lib/python3.12/site-packages/subarulink/controller.py", line 608, in fetch
    result = await self._fetch_status(vin)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/subarulink/controller.py", line 1120, in _fetch_status
    raise err
  File "/usr/local/lib/python3.12/site-packages/subarulink/controller.py", line 1113, in _fetch_status
    await self._locate(vin)
  File "/usr/local/lib/python3.12/site-packages/subarulink/controller.py", line 1155, in _locate
    js_resp = await self._remote_query(vin, api.API_LOCATE)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/subarulink/controller.py", line 1022, in _remote_query
    raise SubaruException("Remote query failed. Response: %s " % js_resp)
subarulink.exceptions.SubaruException