Coalesce to empty list if zigbee.mqtt.devices returns null.

This commit is contained in:
Fabio Manganiello 2023-09-22 17:00:53 +02:00
parent 55965e962c
commit 79e24461cb
Signed by: blacklight
GPG key ID: D90FBA7F76362774

View file

@ -1080,7 +1080,7 @@ class ZigbeeMqttPlugin(
devices = list( devices = list(
{ {
self._preferred_name(device) 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) if self._preferred_name(device)
} }
) )