Move temperature conversions to entity base class (7/8) (#54482)

This commit is contained in:
Erik Montnemery 2021-08-11 18:57:50 +02:00 committed by GitHub
parent 41f3c2766c
commit 94a264afaf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
54 changed files with 153 additions and 153 deletions

View file

@ -331,12 +331,12 @@ class SystemMonitorSensor(SensorEntity):
return self.sensor_type[SENSOR_TYPE_ICON] # type: ignore[no-any-return]
@property
def state(self) -> str | None:
def native_value(self) -> str | None:
"""Return the state of the device."""
return self.data.state
@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.sensor_type[SENSOR_TYPE_UOM] # type: ignore[no-any-return]