Move temperature conversions to sensor base class (8/8) (#54483)
* Move temperature conversions to entity base class (8/8) * Fix wallbox sensor * Fix tests
This commit is contained in:
parent
e23750b2a4
commit
ae507aeed1
48 changed files with 141 additions and 129 deletions
|
@ -78,12 +78,12 @@ class NumberEntity(WiffiEntity, SensorEntity):
|
|||
return self._device_class
|
||||
|
||||
@property
|
||||
def unit_of_measurement(self):
|
||||
def native_unit_of_measurement(self):
|
||||
"""Return the unit of measurement of this entity."""
|
||||
return self._unit_of_measurement
|
||||
|
||||
@property
|
||||
def state(self):
|
||||
def native_value(self):
|
||||
"""Return the value of the entity."""
|
||||
return self._value
|
||||
|
||||
|
@ -111,7 +111,7 @@ class StringEntity(WiffiEntity, SensorEntity):
|
|||
self.reset_expiration_date()
|
||||
|
||||
@property
|
||||
def state(self):
|
||||
def native_value(self):
|
||||
"""Return the value of the entity."""
|
||||
return self._value
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue