From 9ec06029862c41370bd5f770745bbb2d8431e44b Mon Sep 17 00:00:00 2001 From: bouni Date: Sat, 19 Oct 2019 20:33:05 +0200 Subject: [PATCH] Move imports in cpuspeed component (#27890) --- homeassistant/components/cpuspeed/sensor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/cpuspeed/sensor.py b/homeassistant/components/cpuspeed/sensor.py index 9484e770998..53598e24c70 100644 --- a/homeassistant/components/cpuspeed/sensor.py +++ b/homeassistant/components/cpuspeed/sensor.py @@ -1,11 +1,12 @@ """Support for displaying the current CPU speed.""" import logging +from cpuinfo import cpuinfo import voluptuous as vol -import homeassistant.helpers.config_validation as cv from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import CONF_NAME +import homeassistant.helpers.config_validation as cv from homeassistant.helpers.entity import Entity _LOGGER = logging.getLogger(__name__) @@ -75,7 +76,6 @@ class CpuSpeedSensor(Entity): def update(self): """Get the latest data and updates the state.""" - from cpuinfo import cpuinfo self.info = cpuinfo.get_cpu_info() if HZ_ACTUAL_RAW in self.info: