mrk-its / homeassistant-blitzortung

Custom Component for fetching lightning data from blitzortung.org
MIT License
186 stars 38 forks source link

Addon no longer working, fails with error #107

Open aarondrabeck opened 1 month ago

aarondrabeck commented 1 month ago

Logger: homeassistant Source: components/sensor/init.py:606 First occurred: June 24, 2024 at 1:46:48 PM (1449 occurrences) Last logged: 2:18:18 PM

Error doing job: Task exception was never retrieved (None) Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 595, in state if value.tzinfo is None: ^^^^^^^^^^^^ AttributeError: 'str' object has no attribute 'tzinfo'

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1525, in _async_process_registry_update_or_remove self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1000, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1126, in _async_write_ha_state state, attr, capabilities, shadowed_attr = self.async_calculate_state() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1061, in async_calculate_state state = self._stringify_state(available) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1006, in _stringify_state if (state := self.state) is None: ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 606, in state raise ValueError( ValueError: Invalid datetime: sensor.last_lightning_strike has timestamp device class but provides state 2024-06-24T13:44:58-06:00:<class 'str'> resulting in ''str' object has no attribute 'tzinfo''