Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion homeassistant/components/sensor/glances.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,11 @@ def state(self):
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':
Expand Down