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
|
@ -44,7 +44,7 @@ class ONVIFSensor(ONVIFBaseEntity, SensorEntity):
|
|||
super().__init__(device)
|
||||
|
||||
@property
|
||||
def state(self) -> None | str | int | float:
|
||||
def native_value(self) -> None | str | int | float:
|
||||
"""Return the state of the entity."""
|
||||
return self.device.events.get_uid(self.uid).value
|
||||
|
||||
|
@ -59,7 +59,7 @@ class ONVIFSensor(ONVIFBaseEntity, SensorEntity):
|
|||
return self.device.events.get_uid(self.uid).device_class
|
||||
|
||||
@property
|
||||
def unit_of_measurement(self) -> str | None:
|
||||
def native_unit_of_measurement(self) -> str | None:
|
||||
"""Return the unit of measurement of this entity, if any."""
|
||||
return self.device.events.get_uid(self.uid).unit_of_measurement
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue