mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 14:17:45 +00:00
Use device class icon in cpu-speed (#111360)
* Use device class icon in cpu-speed * Use device class icon in cpu-speed
This commit is contained in:
parent
ba961e12a4
commit
9afa154271
@ -33,7 +33,6 @@ class CPUSpeedSensor(SensorEntity):
|
||||
"""Representation of a CPU sensor."""
|
||||
|
||||
_attr_device_class = SensorDeviceClass.FREQUENCY
|
||||
_attr_icon = "mdi:pulse"
|
||||
_attr_has_entity_name = True
|
||||
_attr_name = None
|
||||
_attr_native_unit_of_measurement = UnitOfFrequency.GIGAHERTZ
|
||||
|
@ -13,7 +13,6 @@ from homeassistant.const import (
|
||||
ATTR_DEVICE_CLASS,
|
||||
ATTR_ENTITY_ID,
|
||||
ATTR_FRIENDLY_NAME,
|
||||
ATTR_ICON,
|
||||
STATE_UNKNOWN,
|
||||
)
|
||||
from homeassistant.core import HomeAssistant
|
||||
@ -42,7 +41,6 @@ async def test_sensor(
|
||||
assert state
|
||||
assert state.state == "3.2"
|
||||
assert state.attributes.get(ATTR_FRIENDLY_NAME) == "CPU Speed"
|
||||
assert state.attributes.get(ATTR_ICON) == "mdi:pulse"
|
||||
assert state.attributes.get(ATTR_DEVICE_CLASS) == SensorDeviceClass.FREQUENCY
|
||||
|
||||
assert state.attributes.get(ATTR_ARCH) == "aargh"
|
||||
|
Loading…
x
Reference in New Issue
Block a user