mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Remove entity description mixin in Ring (#112928)
This commit is contained in:
parent
22f6558647
commit
b837a969d8
@ -20,20 +20,13 @@ from .coordinator import RingNotificationsCoordinator
|
|||||||
from .entity import RingEntity
|
from .entity import RingEntity
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True, kw_only=True)
|
||||||
class RingRequiredKeysMixin:
|
class RingBinarySensorEntityDescription(BinarySensorEntityDescription):
|
||||||
"""Mixin for required keys."""
|
"""Describes Ring binary sensor entity."""
|
||||||
|
|
||||||
category: list[str]
|
category: list[str]
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
|
||||||
class RingBinarySensorEntityDescription(
|
|
||||||
BinarySensorEntityDescription, RingRequiredKeysMixin
|
|
||||||
):
|
|
||||||
"""Describes Ring binary sensor entity."""
|
|
||||||
|
|
||||||
|
|
||||||
BINARY_SENSOR_TYPES: tuple[RingBinarySensorEntityDescription, ...] = (
|
BINARY_SENSOR_TYPES: tuple[RingBinarySensorEntityDescription, ...] = (
|
||||||
RingBinarySensorEntityDescription(
|
RingBinarySensorEntityDescription(
|
||||||
key="ding",
|
key="ding",
|
||||||
|
@ -143,18 +143,13 @@ class HistoryRingSensor(RingSensor):
|
|||||||
return attrs
|
return attrs
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True, kw_only=True)
|
||||||
class RingRequiredKeysMixin:
|
class RingSensorEntityDescription(SensorEntityDescription):
|
||||||
"""Mixin for required keys."""
|
"""Describes Ring sensor entity."""
|
||||||
|
|
||||||
category: list[str]
|
category: list[str]
|
||||||
cls: type[RingSensor]
|
cls: type[RingSensor]
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
|
||||||
class RingSensorEntityDescription(SensorEntityDescription, RingRequiredKeysMixin):
|
|
||||||
"""Describes Ring sensor entity."""
|
|
||||||
|
|
||||||
kind: str | None = None
|
kind: str | None = None
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user