mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 14:17:45 +00:00
Move imports in cpuspeed component (#27890)
This commit is contained in:
parent
840001e168
commit
9ec0602986
@ -1,11 +1,12 @@
|
|||||||
"""Support for displaying the current CPU speed."""
|
"""Support for displaying the current CPU speed."""
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
from cpuinfo import cpuinfo
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
import homeassistant.helpers.config_validation as cv
|
|
||||||
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
||||||
from homeassistant.const import CONF_NAME
|
from homeassistant.const import CONF_NAME
|
||||||
|
import homeassistant.helpers.config_validation as cv
|
||||||
from homeassistant.helpers.entity import Entity
|
from homeassistant.helpers.entity import Entity
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
@ -75,7 +76,6 @@ class CpuSpeedSensor(Entity):
|
|||||||
|
|
||||||
def update(self):
|
def update(self):
|
||||||
"""Get the latest data and updates the state."""
|
"""Get the latest data and updates the state."""
|
||||||
from cpuinfo import cpuinfo
|
|
||||||
|
|
||||||
self.info = cpuinfo.get_cpu_info()
|
self.info = cpuinfo.get_cpu_info()
|
||||||
if HZ_ACTUAL_RAW in self.info:
|
if HZ_ACTUAL_RAW in self.info:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user