Remove deprecated temperature conversion of non temperature sensors (#69069)

This commit is contained in:
Erik Montnemery 2022-04-04 20:02:40 +02:00 committed by GitHub
parent 04dd7c3f7c
commit e830032b33
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 34 additions and 48 deletions

View file

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