Move temperature conversions to entity base class (2/8) (#54468)

This commit is contained in:
Erik Montnemery 2021-08-11 18:57:12 +02:00 committed by GitHub
parent f020d65416
commit 41f3c2766c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
50 changed files with 207 additions and 205 deletions

View file

@ -89,7 +89,7 @@ class DovadoSensor(SensorEntity):
return f"{self._data.name} {SENSORS[self._sensor][1]}"
@property
def state(self):
def native_value(self):
"""Return the sensor state."""
return self._state
@ -99,7 +99,7 @@ class DovadoSensor(SensorEntity):
return SENSORS[self._sensor][3]
@property
def unit_of_measurement(self):
def native_unit_of_measurement(self):
"""Return the unit of measurement."""
return SENSORS[self._sensor][2]