mirror of
https://github.com/home-assistant/core.git
synced 2025-07-28 07:37:34 +00:00
Quality fixes for Tessie (#105838)
This commit is contained in:
parent
a12c490cff
commit
59630460c6
@ -40,6 +40,6 @@ class TessieEntity(CoordinatorEntity[TessieDataUpdateCoordinator]):
|
|||||||
)
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def value(self) -> Any:
|
def _value(self) -> Any:
|
||||||
"""Return value from coordinator data."""
|
"""Return value from coordinator data."""
|
||||||
return self.coordinator.data[self.key]
|
return self.coordinator.data[self.key]
|
||||||
|
@ -31,8 +31,6 @@ from .const import DOMAIN, TessieStatus
|
|||||||
from .coordinator import TessieDataUpdateCoordinator
|
from .coordinator import TessieDataUpdateCoordinator
|
||||||
from .entity import TessieEntity
|
from .entity import TessieEntity
|
||||||
|
|
||||||
PARALLEL_UPDATES = 0
|
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class TessieSensorEntityDescription(SensorEntityDescription):
|
class TessieSensorEntityDescription(SensorEntityDescription):
|
||||||
@ -222,4 +220,4 @@ class TessieSensorEntity(TessieEntity, SensorEntity):
|
|||||||
@property
|
@property
|
||||||
def native_value(self) -> StateType:
|
def native_value(self) -> StateType:
|
||||||
"""Return the state of the sensor."""
|
"""Return the state of the sensor."""
|
||||||
return self.entity_description.value_fn(self.value)
|
return self.entity_description.value_fn(self._value)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user