Skip to content

Commit

Permalink
Update bonairepyclimate.py
Browse files Browse the repository at this point in the history
  • Loading branch information
bremor authored Mar 12, 2021
1 parent 3fee4e7 commit ea40f9e
Showing 1 changed file with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -226,17 +226,15 @@ async def queue_commands(self):
self._postzoneinfo_response_ok = False

def get_zone_combinations(self, zoneList):

# Installations without multiple zones will have one 'Common' zone
if zoneList == 'Common':
return ['Common']

zoneList = zoneList.replace(',','')
preset_modes = []
zoneList = zoneList.split(",")

for i in range(1, len(zoneList)+1):
preset_modes.extend(combinations(zoneList, i))
com = list(combinations(zoneList, i))
for i in range(0, len(com)):
preset_modes.append(",".join(com[i]).replace("C","Common"))

return list(map(lambda x: ','.join(x), preset_modes))
return preset_modes

async def start(self):

Expand Down

0 comments on commit ea40f9e

Please sign in to comment.