mirror of
https://github.com/home-assistant/core.git
synced 2025-07-28 07:37:34 +00:00
Only send integers when setting Huum sauna temperature (#149380)
This commit is contained in:
parent
6adcd34521
commit
760b69d458
@ -89,7 +89,10 @@ class HuumDevice(HuumBaseEntity, ClimateEntity):
|
||||
async def async_set_hvac_mode(self, hvac_mode: HVACMode) -> None:
|
||||
"""Set hvac mode."""
|
||||
if hvac_mode == HVACMode.HEAT:
|
||||
await self._turn_on(self.target_temperature)
|
||||
# Make sure to send integers
|
||||
# The temperature is not always an integer if the user uses Fahrenheit
|
||||
temperature = int(self.target_temperature)
|
||||
await self._turn_on(temperature)
|
||||
elif hvac_mode == HVACMode.OFF:
|
||||
await self.coordinator.huum.turn_off()
|
||||
await self.coordinator.async_refresh()
|
||||
@ -99,6 +102,7 @@ class HuumDevice(HuumBaseEntity, ClimateEntity):
|
||||
temperature = kwargs.get(ATTR_TEMPERATURE)
|
||||
if temperature is None or self.hvac_mode != HVACMode.HEAT:
|
||||
return
|
||||
temperature = int(temperature)
|
||||
|
||||
await self._turn_on(temperature)
|
||||
await self.coordinator.async_refresh()
|
||||
|
Loading…
x
Reference in New Issue
Block a user