basschipper / homeassistant-generic-hygrostat

Generic Hygrostat for Home Assistant
79 stars 20 forks source link

Integration no longer functioning. #51

Closed 10Thirty closed 1 year ago

10Thirty commented 1 year ago

Hi,

I have noticed that the hygrostat entities are no longer updating in 2023.6.3 and I have the following error in the home-assistant.log

2023-06-27 10:43:43.139 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback async_track_point_in_utc_time.<locals>.run_action(<Job track ti...1457b7711080>>) at /usr/src/homeassistant/homeassistant/helpers/event.py:1348
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 1363, in run_action
    hass.async_run_hass_job(job, utc_point_in_time)
  File "/usr/src/homeassistant/homeassistant/core.py", line 618, in async_run_hass_job
    hassjob.target(*args)
  File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 1452, in interval_listener
    hass.async_run_hass_job(job, now)
  File "/usr/src/homeassistant/homeassistant/core.py", line 618, in async_run_hass_job
    hassjob.target(*args)
  File "/config/custom_components/generic_hygrostat/binary_sensor.py", line 147, in _async_update
    self.update_humidity()
  File "/config/custom_components/generic_hygrostat/binary_sensor.py", line 187, in update_humidity
    self.sensor_humidity = float(sensor.attributes[self.sensor_attribute])
                                 ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'humidity'

I have tried redownloading from HACS and get the same error. I this something that is unique to my installation or are other people having the same issue?

10Thirty commented 1 year ago

I figured it out. I switched from Zigbee2mqtt to ZHA and needed to remove the "attribute: humidity" from my configuration.yaml for each sensor.