Restores unit_of_measurement (#54335)
This commit is contained in:
parent
188919f079
commit
b88f0adbe9
2 changed files with 5 additions and 0 deletions
|
@ -145,6 +145,10 @@ class IntegrationSensor(RestoreEntity, SensorEntity):
|
|||
)
|
||||
self._attr_device_class = state.attributes.get(ATTR_DEVICE_CLASS)
|
||||
|
||||
self._unit_of_measurement = state.attributes.get(
|
||||
ATTR_UNIT_OF_MEASUREMENT
|
||||
)
|
||||
|
||||
@callback
|
||||
def calc_integration(event):
|
||||
"""Handle the sensor state changes."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue