We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a0acbc2 commit d625734Copy full SHA for d625734
custom_components/treeow/sensor.py
@@ -59,7 +59,7 @@ def _update_value(self):
59
_LOGGER.debug(f'Sensor [{self._attr_unique_id}] temperature/humidity value {value} adjusted to {processed_value}')
60
61
# Handle HCHO (formaldehyde) values - API returns integer (e.g. 35), convert to mg/m³ (0.035)
62
- if self._is_hcho and isinstance(processed_value, (int, float)):
+ if self._is_hcho and isinstance(processed_value, (int, float)) and processed_value > 1:
63
processed_value = processed_value / 1000
64
_LOGGER.debug(f'Sensor [{self._attr_unique_id}] HCHO value {value} converted to {processed_value} mg/m³')
65
0 commit comments