Hi All, I’d appreciate some help diagnosing a problem, I think I’m missing something obvious…
I’m trying to use basschipper’s custom hygrostat
but it won’t run.
The home-assistant.log shows at startup
2024-03-10 12:36:23.629 WARNING (MainThread) [custom_components.generic_hygrostat.binary_sensor] Unknown humidity sensor 'sensor.bathroom_sensor_aqara_t1_humidity'
then every 5 mins
2024-03-10 12:41:23.631 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback _run_async_call_action(<HomeAssistant RUNNING>, <Job track ti...t.py:1506>>)>>) at /usr/src/homeassistant/homeassistant/helpers/event.py:1506
Traceback (most recent call last):
File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 1510, in _run_async_call_action
hass.async_run_hass_job(job, time_tracker_utcnow())
File "/usr/src/homeassistant/homeassistant/core.py", line 727, in async_run_hass_job
hassjob.target(*args)
File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 1604, in _interval_listener
hass.async_run_hass_job(self._run_job, now)
File "/usr/src/homeassistant/homeassistant/core.py", line 727, 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’m guessing the two problems are related, i.e. it can’t see the sensor. But I can’t work out why, any suggestions? I can see the sensor just fine from the HA UI, and have added a card to the dashboard to display humidity, works fine. I’ve double-checked the entity ID is “sensor.bathroom_sensor_aqara_t1_humidity”
Any pointers gratefully received. Debugging this sort of stuff in HA is a bit beyond me…