diff --git a/custom_components/wundasmart/climate.py b/custom_components/wundasmart/climate.py index 2279db5..bcf39d5 100644 --- a/custom_components/wundasmart/climate.py +++ b/custom_components/wundasmart/climate.py @@ -118,10 +118,10 @@ def __init__( # https://developers.home-assistant.io/blog/2024/01/24/climate-climateentityfeatures-expanded/ self._enable_turn_on_off_backwards_compatibility = False self._attr_supported_features = ( - ClimateEntityFeature.TARGET_TEMPERATURE - | ClimateEntityFeature.PRESET_MODE - | ClimateEntityFeature.TURN_ON - | ClimateEntityFeature.TURN_OFF + ClimateEntityFeature.TARGET_TEMPERATURE + | ClimateEntityFeature.PRESET_MODE + | ClimateEntityFeature.TURN_ON + | ClimateEntityFeature.TURN_OFF ) self._attr_current_temperature = None self._attr_target_temperature = None @@ -322,7 +322,7 @@ async def async_set_hvac_mode(self, hvac_mode: HVACMode): "time": 0 }) elif hvac_mode == HVACMode.HEAT: - # Set the target temperature to the t_hi preset temp + # Set the target temperature to the t_hi preset temp async with get_session(self._wunda_ip) as session: await send_command( session, @@ -333,7 +333,7 @@ async def async_set_hvac_mode(self, hvac_mode: HVACMode): params={ "cmd": 1, "roomid": self._wunda_id, - "temp": float(self.__state["t_hi"]), + "temp": float(self.__state["t_hi"]), "locktt": 0, "time": 0 }) @@ -385,11 +385,11 @@ async def async_set_preset_mode(self, preset_mode) -> None: # Fetch the updated state await self.coordinator.async_request_refresh() - - async def async_turn_on(self) -> None: - """Turn the entity on.""" - await self.async_set_hvac_mode(HVACMode.HEAT) - - async def async_turn_off(self) -> None: - """Turn the entity off.""" - await self.async_set_hvac_mode(HVACMode.OFF) + + async def async_turn_on(self) -> None: + """Turn the entity on.""" + await self.async_set_hvac_mode(HVACMode.HEAT) + + async def async_turn_off(self) -> None: + """Turn the entity off.""" + await self.async_set_hvac_mode(HVACMode.OFF)