mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 09:47:13 +00:00
Allow to monitor Windows hosts (#6803)
This commit is contained in:
parent
b8c1bc9542
commit
d027df5a89
@ -133,7 +133,11 @@ class GlancesSensor(Entity):
|
||||
elif self.type == 'swap_free':
|
||||
return round(value['memswap']['free'] / 1024**3, 1)
|
||||
elif self.type == 'processor_load':
|
||||
return value['load']['min15']
|
||||
# Windows systems don't provide load details
|
||||
try:
|
||||
return value['load']['min15']
|
||||
except KeyError:
|
||||
return value['cpu']['total']
|
||||
elif self.type == 'process_running':
|
||||
return value['processcount']['running']
|
||||
elif self.type == 'process_total':
|
||||
|
Loading…
x
Reference in New Issue
Block a user