mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Correct current temperature for tuya thermostats (#66715)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
parent
56d45c49e9
commit
9389d1e561
@ -365,6 +365,13 @@ class TuyaClimateEntity(TuyaEntity, ClimateEntity):
|
|||||||
if temperature is None:
|
if temperature is None:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
if self._current_temperature.scale == 0 and self._current_temperature.step != 1:
|
||||||
|
# The current temperature can have a scale of 0 or 1 and is used for
|
||||||
|
# rounding, Home Assistant doesn't need to round but we will always
|
||||||
|
# need to divide the value by 10^1 in case of 0 as scale.
|
||||||
|
# https://developer.tuya.com/en/docs/iot/shift-temperature-scale-follow-the-setting-of-app-account-center?id=Ka9qo7so58efq#title-7-Round%20values
|
||||||
|
temperature = temperature / 10
|
||||||
|
|
||||||
return self._current_temperature.scale_value(temperature)
|
return self._current_temperature.scale_value(temperature)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
Loading…
x
Reference in New Issue
Block a user