Move temperature conversions to sensor base class (5/8) (#54475)
This commit is contained in:
parent
e55868b17f
commit
103e21c278
65 changed files with 289 additions and 288 deletions
|
@ -368,7 +368,7 @@ class OneWireSensor(OneWireBaseEntity, SensorEntity):
|
|||
"""Mixin for sensor specific attributes."""
|
||||
|
||||
@property
|
||||
def unit_of_measurement(self) -> str | None:
|
||||
def native_unit_of_measurement(self) -> str | None:
|
||||
"""Return the unit the value is expressed in."""
|
||||
return self._unit_of_measurement
|
||||
|
||||
|
@ -377,7 +377,7 @@ class OneWireProxySensor(OneWireProxyEntity, OneWireSensor):
|
|||
"""Implementation of a 1-Wire sensor connected through owserver."""
|
||||
|
||||
@property
|
||||
def state(self) -> StateType:
|
||||
def native_value(self) -> StateType:
|
||||
"""Return the state of the entity."""
|
||||
return self._state
|
||||
|
||||
|
@ -405,7 +405,7 @@ class OneWireDirectSensor(OneWireSensor):
|
|||
self._owsensor = owsensor
|
||||
|
||||
@property
|
||||
def state(self) -> StateType:
|
||||
def native_value(self) -> StateType:
|
||||
"""Return the state of the entity."""
|
||||
return self._state
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue