Remove entity description mixin in Roku (#112931)
This commit is contained in:
parent
85bc72f9f1
commit
b59bba8951
3 changed files with 12 additions and 33 deletions
|
@ -20,20 +20,13 @@ from .const import DOMAIN
|
|||
from .entity import RokuEntity
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class RokuBinarySensorEntityDescriptionMixin:
|
||||
"""Mixin for required keys."""
|
||||
@dataclass(frozen=True, kw_only=True)
|
||||
class RokuBinarySensorEntityDescription(BinarySensorEntityDescription):
|
||||
"""Describes a Roku binary sensor entity."""
|
||||
|
||||
value_fn: Callable[[RokuDevice], bool | None]
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class RokuBinarySensorEntityDescription(
|
||||
BinarySensorEntityDescription, RokuBinarySensorEntityDescriptionMixin
|
||||
):
|
||||
"""Describes a Roku binary sensor entity."""
|
||||
|
||||
|
||||
BINARY_SENSORS: tuple[RokuBinarySensorEntityDescription, ...] = (
|
||||
RokuBinarySensorEntityDescription(
|
||||
key="headphones_connected",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue