diff --git a/pyproject.toml b/pyproject.toml index 637b6c8..d80e3b9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "pyvera" -version = "0.3.8" +version = "0.3.9" description = "Python API for talking to Veracontrollers" license = "GPL2" diff --git a/pyvera/__init__.py b/pyvera/__init__.py index 2dc1eaa..3e61332 100755 --- a/pyvera/__init__.py +++ b/pyvera/__init__.py @@ -210,7 +210,7 @@ def get_devices(self, category_filter: str = "") -> List["VeraDevice"]: alerts = json_data.get("alerts", ()) for item in items: - item["deviceInfo"] = self.device_id_map.get(item.get("id")) + item["deviceInfo"] = self.device_id_map.get(item.get("id")) or {} item_alerts = [ alert for alert in alerts if alert.get("PK_Device") == item.get("id") ]