mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 22:27:07 +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)
|
@dataclass(frozen=True, kw_only=True)
|
||||||
class TrafikverketRequiredKeysMixin:
|
class TrafikverketSensorEntityDescription(SensorEntityDescription):
|
||||||
"""Mixin for required keys."""
|
"""Describes Trafikverket sensor entity."""
|
||||||
|
|
||||||
value_fn: Callable[[WeatherStationInfo], StateType | datetime]
|
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:
|
def add_utc_timezone(date_time: datetime | None) -> datetime | None:
|
||||||
"""Add UTC timezone if datetime."""
|
"""Add UTC timezone if datetime."""
|
||||||
if date_time:
|
if date_time:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user