From 79e24461cb0f3ba5111725329a8d6df7062ca8ca Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Fri, 22 Sep 2023 17:00:53 +0200 Subject: [PATCH] Coalesce to empty list if `zigbee.mqtt.devices` returns null. --- platypush/plugins/zigbee/mqtt/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platypush/plugins/zigbee/mqtt/__init__.py b/platypush/plugins/zigbee/mqtt/__init__.py index 24da49b73..a6ef93541 100644 --- a/platypush/plugins/zigbee/mqtt/__init__.py +++ b/platypush/plugins/zigbee/mqtt/__init__.py @@ -1080,7 +1080,7 @@ class ZigbeeMqttPlugin( devices = list( { self._preferred_name(device) - for device in list(self.devices(**kwargs).output) # type: ignore + for device in list(self.devices(**kwargs).output or []) if self._preferred_name(device) } )