Remove entity description mixin in Geocaching (#112770)

This commit is contained in:
Joost Lekkerkerker 2024-03-09 16:07:10 +01:00 committed by GitHub
parent 6e1981c43c
commit 2b2f7d1193
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -19,20 +19,13 @@ from .const import DOMAIN
from .coordinator import GeocachingDataUpdateCoordinator from .coordinator import GeocachingDataUpdateCoordinator
@dataclass(frozen=True) @dataclass(frozen=True, kw_only=True)
class GeocachingRequiredKeysMixin: class GeocachingSensorEntityDescription(SensorEntityDescription):
"""Mixin for required keys.""" """Define Sensor entity description class."""
value_fn: Callable[[GeocachingStatus], str | int | None] value_fn: Callable[[GeocachingStatus], str | int | None]
@dataclass(frozen=True)
class GeocachingSensorEntityDescription(
SensorEntityDescription, GeocachingRequiredKeysMixin
):
"""Define Sensor entity description class."""
SENSORS: tuple[GeocachingSensorEntityDescription, ...] = ( SENSORS: tuple[GeocachingSensorEntityDescription, ...] = (
GeocachingSensorEntityDescription( GeocachingSensorEntityDescription(
key="find_count", key="find_count",