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,
|
**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(
|
||||||
|
|
Loading…
Reference in a new issue