custom-components / places

Component to integrate with OpenStreetMap Reverse Geocode (places)
GNU General Public License v3.0
110 stars 22 forks source link

Enable extended attributes does not work anymore #267

Closed kristofferbj closed 5 months ago

kristofferbj commented 5 months ago

Since a few days, the extended attributes does not work anymore. When it is enabled, the sensor isn't created and I get this in the log (seems to me that "wikidata" is the bug):

2024-03-16 09:55:17.130 ERROR (MainThread) [homeassistant.components.sensor] places: Error on device update! Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 682, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1262, in async_device_update await self.async_update() File "/config/custom_components/places/sensor.py", line 586, in async_update await self._hass.async_add_executor_job(self.do_update, update_type) File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/places/sensor.py", line 2276, in do_update self.get_extended_attr() File "/config/custom_components/places/sensor.py", line 1807, in get_extended_attr and "wikidata" ^^^^^^^^^^

kristofferbj commented 5 months ago

I have Home Assistant Core 2020.3.0 and HAOS 12.0.

Snuffy2 commented 5 months ago
2024-03-16 18:26:38.959 ERROR (MainThread) [homeassistant] Error doing job: Future exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/places/sensor.py", line 2276, in do_update
self.get_extended_attr()
File "/config/custom_components/places/sensor.py", line 1807, in get_extended_attr
and "wikidata"
^^^^^^^^^^
TypeError: argument of type 'NoneType' is not iterable