mirror of
https://github.com/home-assistant/core.git
synced 2025-04-25 09:47:52 +00:00
Fix sensor.systemmonitor
This commit is contained in:
parent
965730eb60
commit
2df26a0d1a
@ -59,7 +59,6 @@ arg
|
||||
Additional details for the type, eg. path, binary name, etc.
|
||||
"""
|
||||
import logging
|
||||
import psutil
|
||||
|
||||
import homeassistant.util.dt as dt_util
|
||||
from homeassistant.helpers.entity import Entity
|
||||
@ -133,6 +132,7 @@ class SystemMonitorSensor(Entity):
|
||||
|
||||
# pylint: disable=too-many-branches
|
||||
def update(self):
|
||||
import psutil
|
||||
if self.type == 'disk_use_percent':
|
||||
self._state = psutil.disk_usage(self.argument).percent
|
||||
elif self.type == 'disk_use':
|
||||
|
Loading…
x
Reference in New Issue
Block a user