Remove deprecated temperature conversion of non temperature sensors (#69069)
This commit is contained in:
parent
04dd7c3f7c
commit
e830032b33
4 changed files with 34 additions and 48 deletions
|
@ -474,7 +474,7 @@ class UtilityMeterSensor(RestoreEntity, SensorEntity):
|
|||
@property
|
||||
def device_class(self):
|
||||
"""Return the device class of the sensor."""
|
||||
return DEVICE_CLASS_MAP.get(self.unit_of_measurement)
|
||||
return DEVICE_CLASS_MAP.get(self._unit_of_measurement)
|
||||
|
||||
@property
|
||||
def state_class(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue