Skip to content

Commit c731e55

Browse files
committed
Fix swing setting for AC
1 parent fbfdd65 commit c731e55

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

midea_beautiful/command.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -671,18 +671,18 @@ def horizontal_swing(self):
671671

672672
@horizontal_swing.setter
673673
def horizontal_swing(self, mode: int):
674-
self.data[17] &= ~0x0011 # Clear the mode bit
675-
self.data[17] |= 0x1110011 if mode else 0
674+
self.data[17] &= ~0b0011 # Clear the mode bit
675+
self.data[17] |= 0b1110011 if mode else 0
676676

677677
@property
678678
def vertical_swing(self):
679679
"""Vertical swing mode active"""
680-
return (self.data[17] & 0x1100) >> 2
680+
return (self.data[17] & 0b1100) >> 2
681681

682682
@vertical_swing.setter
683683
def vertical_swing(self, mode: int):
684-
self.data[17] &= ~0x1100 # Clear the mode bit
685-
self.data[17] |= 0x111100 if mode else 0
684+
self.data[17] &= ~0b1100 # Clear the mode bit
685+
self.data[17] |= 0b111100 if mode else 0
686686

687687
@property
688688
def turbo_fan(self) -> bool:

0 commit comments

Comments
 (0)