mirror of
https://github.com/home-assistant/core.git
synced 2025-07-08 13:57: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
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class NetgearButtonEntityDescriptionRequired:
|
||||
"""Required attributes of NetgearButtonEntityDescription."""
|
||||
@dataclass(frozen=True, kw_only=True)
|
||||
class NetgearButtonEntityDescription(ButtonEntityDescription):
|
||||
"""Class describing Netgear button entities."""
|
||||
|
||||
action: Callable[[NetgearRouter], Callable[[], Coroutine[Any, Any, None]]]
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class NetgearButtonEntityDescription(
|
||||
ButtonEntityDescription, NetgearButtonEntityDescriptionRequired
|
||||
):
|
||||
"""Class describing Netgear button entities."""
|
||||
|
||||
|
||||
BUTTONS = [
|
||||
NetgearButtonEntityDescription(
|
||||
key="reboot",
|
||||
|
@ -36,17 +36,15 @@ SWITCH_TYPES = [
|
||||
class NetgearSwitchEntityDescriptionRequired:
|
||||
"""Required attributes of NetgearSwitchEntityDescription."""
|
||||
|
||||
|
||||
@dataclass(frozen=True, kw_only=True)
|
||||
class NetgearSwitchEntityDescription(SwitchEntityDescription):
|
||||
"""Class describing Netgear Switch entities."""
|
||||
|
||||
update: Callable[[NetgearRouter], bool]
|
||||
action: Callable[[NetgearRouter], bool]
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class NetgearSwitchEntityDescription(
|
||||
SwitchEntityDescription, NetgearSwitchEntityDescriptionRequired
|
||||
):
|
||||
"""Class describing Netgear Switch entities."""
|
||||
|
||||
|
||||
ROUTER_SWITCH_TYPES = [
|
||||
NetgearSwitchEntityDescription(
|
||||
key="access_control",
|
||||
|
Loading…
x
Reference in New Issue
Block a user