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
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class RingRequiredKeysMixin:
|
||||
"""Mixin for required keys."""
|
||||
@dataclass(frozen=True, kw_only=True)
|
||||
class RingBinarySensorEntityDescription(BinarySensorEntityDescription):
|
||||
"""Describes Ring binary sensor entity."""
|
||||
|
||||
category: list[str]
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class RingBinarySensorEntityDescription(
|
||||
BinarySensorEntityDescription, RingRequiredKeysMixin
|
||||
):
|
||||
"""Describes Ring binary sensor entity."""
|
||||
|
||||
|
||||
BINARY_SENSOR_TYPES: tuple[RingBinarySensorEntityDescription, ...] = (
|
||||
RingBinarySensorEntityDescription(
|
||||
key="ding",
|
||||
|
@ -143,18 +143,13 @@ class HistoryRingSensor(RingSensor):
|
||||
return attrs
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class RingRequiredKeysMixin:
|
||||
"""Mixin for required keys."""
|
||||
@dataclass(frozen=True, kw_only=True)
|
||||
class RingSensorEntityDescription(SensorEntityDescription):
|
||||
"""Describes Ring sensor entity."""
|
||||
|
||||
category: list[str]
|
||||
cls: type[RingSensor]
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class RingSensorEntityDescription(SensorEntityDescription, RingRequiredKeysMixin):
|
||||
"""Describes Ring sensor entity."""
|
||||
|
||||
kind: str | None = None
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user