thermal_comfort
thermal_comfort copied to clipboard
Errors in HA system log
After installing thermal comfort using HACS and configuring it using the temperature + humidity sensor of my ComfoAir ventilation system (which measures outside temperature + humidity) I keep getting errors like this in my HA system log:
2022-09-25 11:40:18.172 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.thermal_comfort_outside_using_comfoair_perception fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 515, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 710, in async_device_update
raise exc
File "/config/custom_components/thermal_comfort/sensor.py", line 446, in async_update
value = await getattr(self._device, self._sensor_type)()
File "/config/custom_components/thermal_comfort/sensor.py", line 261, in wrapped
setattr(self, f"_{sensor_type}", await func(self, *args, **kwargs))
File "/config/custom_components/thermal_comfort/sensor.py", line 631, in thermal_perception
dewpoint = await self.dew_point()
File "/config/custom_components/thermal_comfort/sensor.py", line 261, in wrapped
setattr(self, f"_{sensor_type}", await func(self, *args, **kwargs))
File "/config/custom_components/thermal_comfort/sensor.py", line 597, in dew_point
Td = math.log(VP / 0.61078)
ValueError: math domain error
Note: the sensor does seem to work. At least, the entities show values that look correct...
I think this can be closed already. It turns out my comforair sensors are sometimes dropping to 0 for an unknown reason and the timestamps match the timestamps of the errors I see here.
I'll have to dig into the 'comfoconnect' integration to fix the issue causing the values to drop to 0 first ...
Let's keep this open till we provide a nicer error message in this case. Thanks for the report.