dahlb / ha_kia_hyundai

A Home Assistant HACS integration that supports Kia Connect(Uvo). The integration supports the USA.
MIT License
17 stars 6 forks source link

Not working after updating to 2024.3 release #130

Closed zachberger closed 6 months ago

zachberger commented 6 months ago

Region and Brand of car US 2024 Kia Niro EV

Describe the bug None of the entities have been updated since upgrading to the 2024.3 release of Home Assistant.

Debug logs if an error occurred

Logger: custom_components.ha_kia_hyundai.vehicle
Source: helpers/update_coordinator.py:318
integration: Kia/Hyundai ([documentation](https://github.com/dahlb/ha_kia_hyundai), [issues](https://github.com/dahlb/ha_kia_hyundai/issues))
First occurred: March 6, 2024 at 5:57:30 PM (3918 occurrences)
Last logged: 11:42:09 AM
Unexpected error fetching Vehicle 095852 data: Attribute hass is None for <entity unknown.unknown=unknown>

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 318, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 274, in _async_update_data
    return await self.update_method()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/ha_kia_hyundai/vehicle.py", line 126, in async_update_data
    self.calls_today_for_update.mark_used()
  File "/config/custom_components/ha_kia_hyundai/sensor.py", line 153, in mark_used
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 969, in async_write_ha_state
    raise RuntimeError(f"Attribute hass is None for {self}")
RuntimeError: Attribute hass is None for <entity unknown.unknown=unknown>

To Reproduce Steps to reproduce the behavior:

  1. Upgrade to 2024.3

Expected behavior Integration continues to work

dahlb commented 6 months ago

Thanks for writing this up, I can reproduce and should be able to fix it tomorrow night

dahlb commented 6 months ago

fixed in version 1.8.11 thanks again for writing this up, it was a small typo that has existed for a long time in this integration, 2024.3 removed some code that had surprisingly managed to mask this error until now.