Skip to content

Commit

Permalink
device: fix single master zones with only one HVAC mode
Browse files Browse the repository at this point in the history
Signed-off-by: Álvaro Fernández Rojas <[email protected]>
  • Loading branch information
Noltari committed Apr 7, 2022
1 parent 4d51d46 commit e5eec48
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion aioairzone/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,12 @@ def get_modes(self) -> list[OperationMode]:
"""Return zone modes."""
if self.master:
return self.modes
return self.system.get_modes()
modes = self.system.get_modes()
if len(modes) == 0:
modes = [self.mode]
if OperationMode.STOP not in modes:
modes.append(OperationMode.STOP)
return modes

def get_name(self) -> str:
"""Return zone name."""
Expand Down

0 comments on commit e5eec48

Please sign in to comment.