Skip to content

Commit

Permalink
localapi_device: remove unneeded checks
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 Mar 21, 2022
1 parent d091804 commit 7257112
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions aioairzone/localapi_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,16 +230,13 @@ def get_zone(self, system_id: int, zone_id: int) -> Zone:

def num_systems(self) -> int:
"""Return number of airzone systems."""
if self.systems:
return len(self.systems)
return 0
return len(self.systems)

def num_zones(self) -> int:
"""Return total number of zones."""
count = 0
if self.systems:
for system in self.systems.values():
count += system.num_zones()
for system in self.systems.values():
count += system.num_zones()
return count


Expand Down

0 comments on commit 7257112

Please sign in to comment.