Move temperature conversions to sensor base class (4/8) (#54472)

* Move temperature conversions to entity base class (4/8)

* Fix litterrobot sensor

* Fix tests
This commit is contained in:
Erik Montnemery 2021-08-11 21:17:47 +02:00 committed by GitHub
parent ae507aeed1
commit 2720ba2753
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
70 changed files with 195 additions and 183 deletions

View file

@ -73,7 +73,7 @@ class LuftdatenSensor(SensorEntity):
return self._icon
@property
def state(self):
def native_value(self):
"""Return the state of the device."""
if self._data is not None:
try:
@ -82,7 +82,7 @@ class LuftdatenSensor(SensorEntity):
return None
@property
def unit_of_measurement(self):
def native_unit_of_measurement(self):
"""Return the unit of measurement of this entity, if any."""
return self._unit_of_measurement