Remove entity description mixin in Onvif (#112912)
parent
b48032e37e
commit
f86119aec7
|
@ -17,9 +17,9 @@ from .device import ONVIFDevice
|
|||
from .models import Profile
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class ONVIFSwitchEntityDescriptionMixin:
|
||||
"""Mixin for required keys."""
|
||||
@dataclass(frozen=True, kw_only=True)
|
||||
class ONVIFSwitchEntityDescription(SwitchEntityDescription):
|
||||
"""Describes ONVIF switch entity."""
|
||||
|
||||
turn_on_fn: Callable[
|
||||
[ONVIFDevice], Callable[[Profile, Any], Coroutine[Any, Any, None]]
|
||||
|
@ -32,13 +32,6 @@ class ONVIFSwitchEntityDescriptionMixin:
|
|||
supported_fn: Callable[[ONVIFDevice], bool]
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class ONVIFSwitchEntityDescription(
|
||||
SwitchEntityDescription, ONVIFSwitchEntityDescriptionMixin
|
||||
):
|
||||
"""Describes ONVIF switch entity."""
|
||||
|
||||
|
||||
SWITCHES: tuple[ONVIFSwitchEntityDescription, ...] = (
|
||||
ONVIFSwitchEntityDescription(
|
||||
key="autofocus",
|
||||
|
|
Loading…
Reference in New Issue