mirror of
https://github.com/home-assistant/core.git
synced 2025-07-08 22:07:10 +00:00
Remove entity description mixin in Netgear (#112911)
This commit is contained in:
parent
201f733394
commit
f668dfecb2
@ -20,20 +20,13 @@ from .entity import NetgearRouterCoordinatorEntity
|
|||||||
from .router import NetgearRouter
|
from .router import NetgearRouter
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True, kw_only=True)
|
||||||
class NetgearButtonEntityDescriptionRequired:
|
class NetgearButtonEntityDescription(ButtonEntityDescription):
|
||||||
"""Required attributes of NetgearButtonEntityDescription."""
|
"""Class describing Netgear button entities."""
|
||||||
|
|
||||||
action: Callable[[NetgearRouter], Callable[[], Coroutine[Any, Any, None]]]
|
action: Callable[[NetgearRouter], Callable[[], Coroutine[Any, Any, None]]]
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
|
||||||
class NetgearButtonEntityDescription(
|
|
||||||
ButtonEntityDescription, NetgearButtonEntityDescriptionRequired
|
|
||||||
):
|
|
||||||
"""Class describing Netgear button entities."""
|
|
||||||
|
|
||||||
|
|
||||||
BUTTONS = [
|
BUTTONS = [
|
||||||
NetgearButtonEntityDescription(
|
NetgearButtonEntityDescription(
|
||||||
key="reboot",
|
key="reboot",
|
||||||
|
@ -36,17 +36,15 @@ SWITCH_TYPES = [
|
|||||||
class NetgearSwitchEntityDescriptionRequired:
|
class NetgearSwitchEntityDescriptionRequired:
|
||||||
"""Required attributes of NetgearSwitchEntityDescription."""
|
"""Required attributes of NetgearSwitchEntityDescription."""
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass(frozen=True, kw_only=True)
|
||||||
|
class NetgearSwitchEntityDescription(SwitchEntityDescription):
|
||||||
|
"""Class describing Netgear Switch entities."""
|
||||||
|
|
||||||
update: Callable[[NetgearRouter], bool]
|
update: Callable[[NetgearRouter], bool]
|
||||||
action: Callable[[NetgearRouter], bool]
|
action: Callable[[NetgearRouter], bool]
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
|
||||||
class NetgearSwitchEntityDescription(
|
|
||||||
SwitchEntityDescription, NetgearSwitchEntityDescriptionRequired
|
|
||||||
):
|
|
||||||
"""Class describing Netgear Switch entities."""
|
|
||||||
|
|
||||||
|
|
||||||
ROUTER_SWITCH_TYPES = [
|
ROUTER_SWITCH_TYPES = [
|
||||||
NetgearSwitchEntityDescription(
|
NetgearSwitchEntityDescription(
|
||||||
key="access_control",
|
key="access_control",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user