mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 06:07:17 +00:00
zha: fix temperature rounding for ZHA temperature sensors. (#14669)
This commit is contained in:
parent
fcb60d472e
commit
eff1d1f14e
@ -114,9 +114,11 @@ class TemperatureSensor(Sensor):
|
|||||||
"""Return the state of the entity."""
|
"""Return the state of the entity."""
|
||||||
if self._state is None:
|
if self._state is None:
|
||||||
return None
|
return None
|
||||||
celsius = round(float(self._state) / 100, 1)
|
celsius = self._state / 100
|
||||||
return convert_temperature(
|
return round(convert_temperature(celsius,
|
||||||
celsius, TEMP_CELSIUS, self.unit_of_measurement)
|
TEMP_CELSIUS,
|
||||||
|
self.unit_of_measurement),
|
||||||
|
1)
|
||||||
|
|
||||||
|
|
||||||
class RelativeHumiditySensor(Sensor):
|
class RelativeHumiditySensor(Sensor):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user