Remove Daikin int conversion to allow decimal target temperature steps (#61616)

* Remove int conversion in order to allow decimal target temperature steps

* Convert to float and keep 1 digit
This commit is contained in:
Johann Vanackere 2022-03-30 20:03:22 +02:00 committed by GitHub
parent 4ca4180fd2
commit aa6f551b33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -163,7 +163,9 @@ class DaikinClimate(ClimateEntity):
# temperature
elif attr == ATTR_TEMPERATURE:
try:
values[HA_ATTR_TO_DAIKIN[ATTR_TARGET_TEMPERATURE]] = str(int(value))
values[HA_ATTR_TO_DAIKIN[ATTR_TARGET_TEMPERATURE]] = str(
round(float(value), 1)
)
except ValueError:
_LOGGER.error("Invalid temperature %s", value)