Remove entity description mixin in Kraken (#112899)

This commit is contained in:
Joost Lekkerkerker 2024-03-11 12:06:42 +01:00 committed by GitHub
parent 324fc51375
commit d82ffb4e07
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -33,18 +33,13 @@ from .const import (
_LOGGER = logging.getLogger(__name__)
@dataclass(frozen=True)
class KrakenRequiredKeysMixin:
"""Mixin for required keys."""
@dataclass(frozen=True, kw_only=True)
class KrakenSensorEntityDescription(SensorEntityDescription):
"""Describes Kraken sensor entity."""
value_fn: Callable[[DataUpdateCoordinator[KrakenResponse], str], float | int]
@dataclass(frozen=True)
class KrakenSensorEntityDescription(SensorEntityDescription, KrakenRequiredKeysMixin):
"""Describes Kraken sensor entity."""
SENSOR_TYPES: tuple[KrakenSensorEntityDescription, ...] = (
KrakenSensorEntityDescription(
key="ask",