mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 02:07:09 +00:00
Remove entity description mixin in Kraken (#112899)
This commit is contained in:
parent
324fc51375
commit
d82ffb4e07
@ -33,18 +33,13 @@ from .const import (
|
|||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True, kw_only=True)
|
||||||
class KrakenRequiredKeysMixin:
|
class KrakenSensorEntityDescription(SensorEntityDescription):
|
||||||
"""Mixin for required keys."""
|
"""Describes Kraken sensor entity."""
|
||||||
|
|
||||||
value_fn: Callable[[DataUpdateCoordinator[KrakenResponse], str], float | int]
|
value_fn: Callable[[DataUpdateCoordinator[KrakenResponse], str], float | int]
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
|
||||||
class KrakenSensorEntityDescription(SensorEntityDescription, KrakenRequiredKeysMixin):
|
|
||||||
"""Describes Kraken sensor entity."""
|
|
||||||
|
|
||||||
|
|
||||||
SENSOR_TYPES: tuple[KrakenSensorEntityDescription, ...] = (
|
SENSOR_TYPES: tuple[KrakenSensorEntityDescription, ...] = (
|
||||||
KrakenSensorEntityDescription(
|
KrakenSensorEntityDescription(
|
||||||
key="ask",
|
key="ask",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user