From dc8910e0cb8d642fd383475d0203eaf4fb711463 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C5=82awomir=20Skowron?= Date: Mon, 13 May 2024 17:13:47 +0200 Subject: [PATCH] Revert "Make more standard set comfocollmode (#27)" This reverts commit a07a4b90212e1782a337d57b3fdc6d9b7f00b8d3. --- aiocomfoconnect/comfoconnect.py | 5 ++--- aiocomfoconnect/const.py | 6 ------ 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/aiocomfoconnect/comfoconnect.py b/aiocomfoconnect/comfoconnect.py index c807168..e75d55e 100644 --- a/aiocomfoconnect/comfoconnect.py +++ b/aiocomfoconnect/comfoconnect.py @@ -27,7 +27,6 @@ VentilationSetting, VentilationSpeed, VentilationTemperatureProfile, - ComfoCoolMode, ) from aiocomfoconnect.exceptions import ( AioComfoConnectNotConnected, @@ -398,9 +397,9 @@ async def get_comfocool_mode(self): async def set_comfocool_mode(self, mode: Literal["auto", "off"], timeout=-1): """Set the comfocool mode (auto / off).""" - if mode == ComfoCoolMode.AUTO: + if mode == "auto": await self.cmd_rmi_request(bytes([0x85, UNIT_SCHEDULE, SUBUNIT_05, 0x01])) - elif mode == ComfoCoolMode.OFF: + else: await self.cmd_rmi_request(bytestring([0x84, UNIT_SCHEDULE, SUBUNIT_05, 0x01, 0x00, 0x00, 0x00, 0x00, timeout.to_bytes(4, "little", signed=True), 0x00])) async def get_temperature_profile(self): diff --git a/aiocomfoconnect/const.py b/aiocomfoconnect/const.py index 536f3e0..256e5ff 100644 --- a/aiocomfoconnect/const.py +++ b/aiocomfoconnect/const.py @@ -207,9 +207,3 @@ class VentilationSpeed: LOW = "low" MEDIUM = "medium" HIGH = "high" - -class ComfoCoolMode: - """Enum for ventilation settings.""" - - AUTO = "auto" - OFF = "off"