diff --git a/custom_components/yandex_station/climate.py b/custom_components/yandex_station/climate.py index 1b006ee..5bbcd5d 100644 --- a/custom_components/yandex_station/climate.py +++ b/custom_components/yandex_station/climate.py @@ -152,18 +152,16 @@ def on_track_humidity(self, value): async def async_set_hvac_mode(self, hvac_mode: HVACMode): if hvac_mode == HVACMode.OFF: - kwargs = {"on": False} + await self.quasar.device_action(self.device, "on", False) elif self.hvac_instance is None: - kwargs = {"on": True} + await self.quasar.device_action(self.device, "on", True) else: - kwargs = ( - {"on": True, self.hvac_instance: str(hvac_mode)} - if self._attr_hvac_mode == HVACMode.OFF - else {self.hvac_instance: str(hvac_mode)} + if self._attr_hvac_mode == HVACMode.OFF: + await self.quasar.device_action(self.device, "on", True) + await self.quasar.device_action( + self.device, self.hvac_instance, str(hvac_mode) ) - await self.quasar.device_actions(self.device, **kwargs) - async def async_set_temperature(self, temperature: float, **kwargs): await self.quasar.device_action(self.device, "temperature", temperature)