You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ZHA patch for more precision display of data for all Zigbee devices.
Find the file components/zha/sensor.py (lib64/python3.11/site-packages/homeassistant) and fix it:
class Sensor(ZhaEntity, SensorEntity):
"""Base ZHA sensor."""
_attribute_name: int | str | None = None
_decimals: int = 2
_divisor: int = 1
_multiplier: int | float = 1
"""Return the state of the entity."""
# per zcl specs battery percent is reported at 200% ¯\_(ツ)_/¯
if not isinstance(value, numbers.Number) or value == -1:
return None
value = round(value / 2, 1)
return value
ZHA patch for more precision display of data for all Zigbee devices.
Find the file
components/zha/sensor.py
(lib64/python3.11/site-packages/homeassistant
) and fix it:site-packages/homeassistant/components/zha/core/cluster_handlers/general.py :
site-packages/homeassistant/components/zha/core/cluster_handlers/measurement.py :
site-packages/homeassistant/components/zha/core/const.py :
https://community.home-assistant.io/t/provide-higher-precision-temperature-value-unrounded-values/502245
The text was updated successfully, but these errors were encountered: