From 725711271885b8267fa3b5bea05efd19bcc2431b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Mon, 21 Mar 2022 10:12:24 +0100 Subject: [PATCH] localapi_device: remove unneeded checks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Álvaro Fernández Rojas --- aioairzone/localapi_device.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/aioairzone/localapi_device.py b/aioairzone/localapi_device.py index f5f0451..35abd9a 100644 --- a/aioairzone/localapi_device.py +++ b/aioairzone/localapi_device.py @@ -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