r-renato / ha-climacell-weather

Climacell weather provider integration is a custom component for Home Assistant. The climacell platform uses the Climacell API as a source for meteorological data for your location.
MIT License
46 stars 10 forks source link

climacell_custom: Error on device update! #71

Open netsoft-ruidias opened 1 year ago

netsoft-ruidias commented 1 year ago

I am getting the following error:

Logger: homeassistant.components.sensor
Source: custom_components/climacell/sensor.py:409
Integration: Sensor ([documentation](https://www.home-assistant.io/integrations/sensor), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+sensor%22))
First occurred: 17:36:01 (8 occurrences)
Last logged: 17:36:02

climacell_custom: Error on device update!
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 493, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 715, in async_device_update
    await task
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/climacell_custom/sensor.py", line 409, in update
    self._state = sensor_data["values"][self.__field]
KeyError: 'particulateMatter25'

any idea?