diff --git a/homeassistant/helpers/entity.py b/homeassistant/helpers/entity.py index 2e2c1b3b3f9..83ebb98b3e3 100644 --- a/homeassistant/helpers/entity.py +++ b/homeassistant/helpers/entity.py @@ -168,6 +168,11 @@ class Entity(ABC): # If entity is added to an entity platform _added = False + # Entity Properties + _device_class: str | None = None + _icon: str | None = None + _unit_of_measurement: str | None = None + @property def should_poll(self) -> bool: """Return True if entity has to be polled for state. @@ -240,17 +245,17 @@ class Entity(ABC): @property def device_class(self) -> str | None: """Return the class of this device, from component DEVICE_CLASSES.""" - return None + return self._device_class @property def unit_of_measurement(self) -> str | None: """Return the unit of measurement of this entity, if any.""" - return None + return self._unit_of_measurement @property def icon(self) -> str | None: """Return the icon to use in the frontend, if any.""" - return None + return self._icon @property def entity_picture(self) -> str | None: