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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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)