The robustness check in case of missing fields should also apply to other system entities.

This commit is contained in:
Fabio Manganiello 2023-04-29 16:08:38 +02:00
parent 8c9768b05e
commit a3888be216
Signed by: blacklight
GPG Key ID: D90FBA7F76362774
1 changed files with 3 additions and 0 deletions

View File

@ -616,6 +616,7 @@ class SystemPlugin(SensorPlugin, EntityManager):
**nic, **nic,
) )
for nic in entities.get('network', []) for nic in entities.get('network', [])
if nic.get('interface')
], ],
*[ *[
SystemTemperature( SystemTemperature(
@ -625,6 +626,7 @@ class SystemPlugin(SensorPlugin, EntityManager):
**temp, **temp,
) )
for temp in entities.get('temperature', []) for temp in entities.get('temperature', [])
if temp.get('id') and temp.get('label')
], ],
*[ *[
SystemFan( SystemFan(
@ -634,6 +636,7 @@ class SystemPlugin(SensorPlugin, EntityManager):
**fan, **fan,
) )
for fan in entities.get('fans', []) for fan in entities.get('fans', [])
if fan.get('id') and fan.get('label')
], ],
*[ *[
SystemBattery( SystemBattery(