From 9cd33b937912c54d9e1fa9d5780317b1f2726bcf Mon Sep 17 00:00:00 2001 From: Pergola Fabio Date: Tue, 12 Sep 2023 19:11:35 +0200 Subject: [PATCH] fix for indoor num outputs --- hikvision-doorbell/src/doorbell.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hikvision-doorbell/src/doorbell.py b/hikvision-doorbell/src/doorbell.py index a6a7a09..9509a94 100644 --- a/hikvision-doorbell/src/doorbell.py +++ b/hikvision-doorbell/src/doorbell.py @@ -208,11 +208,11 @@ def isapi_door_capabilities() -> int: logger.debug("Error parsing: {}", io_doors_xml) return 0 # Error out if we don't find attribute `max` inside the `doorNo` element - if door_number_element is None : + if door_number_element.text is None: # Print a string representation of the response XML logger.debug("No door relays found for the indoor device") return 0 - #logger.debug("We have found {} door relays for the indoor device", door_number_element.text) + logger.debug("We have found {} door relays for the indoor device", door_number_element.text) return int(door_number_element.text) # Define the list of available endpoints to try