mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 19:27:45 +00:00
Remove entity description mixin in Geocaching (#112770)
This commit is contained in:
parent
6e1981c43c
commit
2b2f7d1193
@ -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",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user