Revert "Cache entity properties that are never expected to change in the base class" (#100422)
Revert "Cache entity properties that are never expected to change in the base class (#95315)"
This reverts commit 042776ebb8
.
This commit is contained in:
parent
7723a9b36b
commit
d1afcd773f
35 changed files with 48 additions and 146 deletions
|
@ -360,10 +360,7 @@ class SensorGroup(GroupEntity, SensorEntity):
|
|||
"""Return the state attributes of the sensor."""
|
||||
return {ATTR_ENTITY_ID: self._entity_ids, **self._extra_state_attribute}
|
||||
|
||||
@property # type: ignore[override]
|
||||
# Because the device class is calculated, there is no guarantee that the
|
||||
# sensors will be available when the entity is created so we do not want to
|
||||
# cache the value.
|
||||
@property
|
||||
def device_class(self) -> SensorDeviceClass | None:
|
||||
"""Return device class."""
|
||||
if self._attr_device_class is not None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue