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
|
@ -89,14 +89,14 @@ class NeatoSensor(SensorEntity):
|
|||
return self._available
|
||||
|
||||
@property
|
||||
def state(self) -> str | None:
|
||||
def native_value(self) -> str | None:
|
||||
"""Return the state."""
|
||||
if self._state is not None:
|
||||
return str(self._state["details"]["charge"])
|
||||
return None
|
||||
|
||||
@property
|
||||
def unit_of_measurement(self) -> str:
|
||||
def native_unit_of_measurement(self) -> str:
|
||||
"""Return unit of measurement."""
|
||||
return PERCENTAGE
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue