Quality fixes for Tessie (#105838)

This commit is contained in:
Brett Adams
2023-12-16 12:11:20 +10:00
committed by GitHub
parent a12c490cff
commit 59630460c6
2 changed files with 2 additions and 4 deletions

View File

@@ -40,6 +40,6 @@ class TessieEntity(CoordinatorEntity[TessieDataUpdateCoordinator]):
)
@property
def value(self) -> Any:
def _value(self) -> Any:
"""Return value from coordinator data."""
return self.coordinator.data[self.key]

View File

@@ -31,8 +31,6 @@ from .const import DOMAIN, TessieStatus
from .coordinator import TessieDataUpdateCoordinator
from .entity import TessieEntity
PARALLEL_UPDATES = 0
@dataclass
class TessieSensorEntityDescription(SensorEntityDescription):
@@ -222,4 +220,4 @@ class TessieSensorEntity(TessieEntity, SensorEntity):
@property
def native_value(self) -> StateType:
"""Return the state of the sensor."""
return self.entity_description.value_fn(self.value)
return self.entity_description.value_fn(self._value)