From d02e0b20e169fd3413867a2ae0204cbcd3e4f10f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Nenz=C3=A9n?= Date: Fri, 23 Aug 2024 22:48:21 +0200 Subject: [PATCH] Don't set fan speed when work mode is Auto --- custom_components/wellbeing/fan.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/custom_components/wellbeing/fan.py b/custom_components/wellbeing/fan.py index e44e07d..ad72aa4 100644 --- a/custom_components/wellbeing/fan.py +++ b/custom_components/wellbeing/fan.py @@ -138,7 +138,10 @@ async def async_turn_on(self, percentage: int | None = None, preset_mode: str | self.async_write_ha_state() await self.api.set_work_mode(self.pnc_id, self._preset_mode) - await self.api.set_fan_speed(self.pnc_id, self._speed) + + if self._preset_mode != WorkMode.AUTO: + await self.api.set_fan_speed(self.pnc_id, self._speed) + await asyncio.sleep(10) await self.coordinator.async_request_refresh()