From a3888be2165da668f4be78e6f5f6dd16d003ef46 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Sat, 29 Apr 2023 16:08:38 +0200 Subject: [PATCH] The robustness check in case of missing fields should also apply to other system entities. --- platypush/plugins/system/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/platypush/plugins/system/__init__.py b/platypush/plugins/system/__init__.py index 54b5d6007d..8b3c962f2c 100644 --- a/platypush/plugins/system/__init__.py +++ b/platypush/plugins/system/__init__.py @@ -616,6 +616,7 @@ class SystemPlugin(SensorPlugin, EntityManager): **nic, ) for nic in entities.get('network', []) + if nic.get('interface') ], *[ SystemTemperature( @@ -625,6 +626,7 @@ class SystemPlugin(SensorPlugin, EntityManager): **temp, ) for temp in entities.get('temperature', []) + if temp.get('id') and temp.get('label') ], *[ SystemFan( @@ -634,6 +636,7 @@ class SystemPlugin(SensorPlugin, EntityManager): **fan, ) for fan in entities.get('fans', []) + if fan.get('id') and fan.get('label') ], *[ SystemBattery(