forked from platypush/platypush
The robustness check in case of missing fields should also apply to other system entities.
This commit is contained in:
parent
8c9768b05e
commit
a3888be216
1 changed files with 3 additions and 0 deletions
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue