mirror of
https://github.com/home-assistant/core.git
synced 2025-08-04 21:25:13 +02:00
Fix sensor.systemmonitor
This commit is contained in:
@@ -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':
|
||||
|
Reference in New Issue
Block a user