From c6b2a2f54a16cc00adb6a795c464658ede9b3b7b Mon Sep 17 00:00:00 2001 From: Elliot Wolk Date: Fri, 14 Apr 2023 11:15:50 -0400 Subject: [PATCH] Fix fan_speed type str=>int for air conditioners --- midea_beautiful/command.py | 1 + 1 file changed, 1 insertion(+) diff --git a/midea_beautiful/command.py b/midea_beautiful/command.py index 1f037ff..c3a3f37 100644 --- a/midea_beautiful/command.py +++ b/midea_beautiful/command.py @@ -664,6 +664,7 @@ def fan_speed(self) -> int: @fan_speed.setter def fan_speed(self, speed: int) -> None: + speed = int(speed) self.data[13] &= ~0b01111111 # Clear the fan speed part self.data[13] |= speed & 0b01111111