mirror of
https://github.com/home-assistant/core.git
synced 2025-07-12 15:57:06 +00:00
Remove entity description mixin in Kaleidescape (#112896)
This commit is contained in:
parent
da40e83fd9
commit
d95f30611e
@ -22,20 +22,13 @@ if TYPE_CHECKING:
|
|||||||
from homeassistant.helpers.typing import StateType
|
from homeassistant.helpers.typing import StateType
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True, kw_only=True)
|
||||||
class BaseEntityDescriptionMixin:
|
class KaleidescapeSensorEntityDescription(SensorEntityDescription):
|
||||||
"""Mixin for required descriptor keys."""
|
"""Describes Kaleidescape sensor entity."""
|
||||||
|
|
||||||
value_fn: Callable[[KaleidescapeDevice], StateType]
|
value_fn: Callable[[KaleidescapeDevice], StateType]
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
|
||||||
class KaleidescapeSensorEntityDescription(
|
|
||||||
SensorEntityDescription, BaseEntityDescriptionMixin
|
|
||||||
):
|
|
||||||
"""Describes Kaleidescape sensor entity."""
|
|
||||||
|
|
||||||
|
|
||||||
SENSOR_TYPES: tuple[KaleidescapeSensorEntityDescription, ...] = (
|
SENSOR_TYPES: tuple[KaleidescapeSensorEntityDescription, ...] = (
|
||||||
KaleidescapeSensorEntityDescription(
|
KaleidescapeSensorEntityDescription(
|
||||||
key="media_location",
|
key="media_location",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user