mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Remove entity description mixin in Trafikverket Ferry (#112955)
This commit is contained in:
parent
39c617eee6
commit
a64f043a93
@ -32,21 +32,14 @@ ATTR_OTHER_INFO = "other_info"
|
||||
SCAN_INTERVAL = timedelta(minutes=5)
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class TrafikverketRequiredKeysMixin:
|
||||
"""Mixin for required keys."""
|
||||
@dataclass(frozen=True, kw_only=True)
|
||||
class TrafikverketSensorEntityDescription(SensorEntityDescription):
|
||||
"""Describes Trafikverket sensor entity."""
|
||||
|
||||
value_fn: Callable[[dict[str, Any]], StateType | datetime]
|
||||
info_fn: Callable[[dict[str, Any]], StateType | list] | None
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class TrafikverketSensorEntityDescription(
|
||||
SensorEntityDescription, TrafikverketRequiredKeysMixin
|
||||
):
|
||||
"""Describes Trafikverket sensor entity."""
|
||||
|
||||
|
||||
SENSOR_TYPES: tuple[TrafikverketSensorEntityDescription, ...] = (
|
||||
TrafikverketSensorEntityDescription(
|
||||
key="departure_time",
|
||||
|
Loading…
x
Reference in New Issue
Block a user