mirror of
https://github.com/XiaoMi/ha_xiaomi_home.git
synced 2025-08-05 14:58:52 +08:00
Fix specs (#929)
* fix: cuco.plug.cp2 voltage and power value ratio * fix: cgllc.airmonitor.s1 unit ppb * fix: roswan.waterpuri.lte01 tds unit * fix: lumi.relay.c2acn01 power consumption unit * fix: xiaomi.bhf_light.s1 fan level of ventilation * fix: error log
This commit is contained in:
@ -110,7 +110,7 @@ class Sensor(MIoTPropertyEntity, SensorEntity):
|
||||
self._attr_native_unit_of_measurement = list(
|
||||
unit_sets)[0] if unit_sets else None
|
||||
# Set suggested precision
|
||||
if spec.format_ in {int, float}:
|
||||
if spec.format_ in {int, float} and spec.expr is None:
|
||||
self._attr_suggested_display_precision = spec.precision
|
||||
# Set state_class
|
||||
if spec.state_class:
|
||||
|
Reference in New Issue
Block a user