mirror of
https://github.com/home-assistant/core.git
synced 2025-07-12 15:57:06 +00:00
move import to top-level (#27352)
This commit is contained in:
parent
0cc2d0d557
commit
d337b71725
@ -3,6 +3,7 @@ import logging
|
||||
import os
|
||||
import socket
|
||||
|
||||
import psutil
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
||||
@ -134,8 +135,6 @@ class SystemMonitorSensor(Entity):
|
||||
|
||||
def update(self):
|
||||
"""Get the latest system information."""
|
||||
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