Move temperature conversions to sensor base class (6/8) (#54476)
* Move temperature conversions to entity base class (6/8) * Fix tests
This commit is contained in:
parent
6de6a5dc14
commit
e558b3463e
64 changed files with 199 additions and 188 deletions
|
@ -48,12 +48,12 @@ class RainCloudSensor(RainCloudEntity, SensorEntity):
|
|||
"""A sensor implementation for raincloud device."""
|
||||
|
||||
@property
|
||||
def state(self):
|
||||
def native_value(self):
|
||||
"""Return the state of the sensor."""
|
||||
return self._state
|
||||
|
||||
@property
|
||||
def unit_of_measurement(self):
|
||||
def native_unit_of_measurement(self):
|
||||
"""Return the units of measurement."""
|
||||
return UNIT_OF_MEASUREMENT_MAP.get(self._sensor_type)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue