mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Remove entity description mixin in Trafikverket Weatherstation (#112957)
This commit is contained in:
parent
dec98d424f
commit
13b8fd4149
@ -43,20 +43,13 @@ PRECIPITATION_TYPE = [
|
||||
]
|
||||
|
||||
|
||||
@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[[WeatherStationInfo], StateType | datetime]
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class TrafikverketSensorEntityDescription(
|
||||
SensorEntityDescription, TrafikverketRequiredKeysMixin
|
||||
):
|
||||
"""Describes Trafikverket sensor entity."""
|
||||
|
||||
|
||||
def add_utc_timezone(date_time: datetime | None) -> datetime | None:
|
||||
"""Add UTC timezone if datetime."""
|
||||
if date_time:
|
||||
|
Loading…
x
Reference in New Issue
Block a user