Skip to content

Commit

Permalink
Update splitAC.py
Browse files Browse the repository at this point in the history
  • Loading branch information
xerxes87 authored Aug 14, 2019
1 parent 9ead2d2 commit 53d6a8c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pyfujitseu/splitAC.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ def get_fan_speed_desc(self):
## 0: 'Horizontal',1: 'Down', 2: 'Unknown', 3: 'Swing'
def changeSwingMode(self, mode):
print(mode)
if self.af_vertical_direction['value'] is not None:
return SWING_LIST_DICT[2] #unknown
elif not isinstance(self.af_vertical_direction['value'],int):
return SWING_LIST_DICT[2] #unknown
if mode.upper() == 'HORIZONTAL':
self.af_vertical_direction = 0
return None
Expand All @@ -138,7 +142,9 @@ def get_swing_mode_desc(self):
2: 'Unknown',
3: 'Swing'
}
if not isinstance(self.af_vertical_direction['value'],int):
if self.af_vertical_direction['value'] is not None:
return SWING_LIST_DICT[2] #unknown
elif not isinstance(self.af_vertical_direction['value'],int):
return SWING_LIST_DICT[2] #unknown
else:
return SWING_LIST_DICT[self.af_vertical_direction['value']]
Expand Down

0 comments on commit 53d6a8c

Please sign in to comment.