Skip to content

Commit

Permalink
Fix API change for AC not supporting floats in SwitchBot Cloud (#132231)
Browse files Browse the repository at this point in the history
  • Loading branch information
SeraphicRav authored Dec 8, 2024
1 parent be10d79 commit ce8c5fc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion homeassistant/components/switchbot_cloud/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ class SwitchBotCloudAirConditioner(SwitchBotCloudEntity, ClimateEntity):
_attr_hvac_mode = HVACMode.FAN_ONLY
_attr_temperature_unit = UnitOfTemperature.CELSIUS
_attr_target_temperature = 21
_attr_target_temperature_step = 1
_attr_precision = 1
_attr_name = None

async def _do_send_command(
Expand All @@ -96,7 +98,7 @@ async def _do_send_command(
)
await self.send_api_command(
AirConditionerCommands.SET_ALL,
parameters=f"{new_temperature},{new_mode},{new_fan_speed},on",
parameters=f"{int(new_temperature)},{new_mode},{new_fan_speed},on",
)

async def async_set_hvac_mode(self, hvac_mode: HVACMode) -> None:
Expand Down

0 comments on commit ce8c5fc

Please sign in to comment.