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:
Joost Lekkerkerker 2024-02-25 14:06:54 +01:00 committed by GitHub
parent ba961e12a4
commit 9afa154271
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 0 additions and 3 deletions

View File

@ -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

View File

@ -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"