Fix Tuya back scaling in Climate and Humidifer entities (#59909)

pull/59950/head
Franck Nijhof 2021-11-19 00:21:27 +01:00 committed by GitHub
parent a3139595bb
commit 8fb84270d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -322,7 +322,7 @@ class TuyaClimateEntity(TuyaEntity, ClimateEntity):
[
{
"code": self._set_humidity_dpcode,
"value": self._set_humidity_type.scale_value(humidity),
"value": self._set_humidity_type.scale_value_back(humidity),
}
]
)
@ -364,7 +364,9 @@ class TuyaClimateEntity(TuyaEntity, ClimateEntity):
{
"code": self._set_temperature_dpcode,
"value": round(
self._set_temperature_type.scale_value(kwargs["temperature"])
self._set_temperature_type.scale_value_back(
kwargs["temperature"]
)
),
}
]

View File

@ -165,7 +165,7 @@ class TuyaHumidifierEntity(TuyaEntity, HumidifierEntity):
[
{
"code": self.entity_description.humidity,
"value": self._set_humidity_type.scale_value(humidity),
"value": self._set_humidity_type.scale_value_back(humidity),
}
]
)