mirror of
https://github.com/home-assistant/core.git
synced 2025-07-29 18:28:14 +02:00
Move temperature conversions to entity base class (7/8) (#54482)
This commit is contained in:
@ -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]
|
||||
|
||||
|
Reference in New Issue
Block a user