66from dataclasses import dataclass
77from typing import Any , Optional
88
9- from asusrouter .modules .state import AsusState
9+ from asusrouter .modules .state import AsusState , AsusStateNone
1010from homeassistant .components .binary_sensor import BinarySensorEntityDescription
1111from homeassistant .components .button import ButtonEntityDescription
1212from homeassistant .components .light import LightEntityDescription
@@ -59,9 +59,9 @@ class ARSwitchDescription(AREntityDescription, SwitchEntityDescription):
5959 icon_on : Optional [str ] = None
6060 icon_off : Optional [str ] = None
6161
62- state_on : Optional [ AsusState ] = None
62+ state_on : AsusState = AsusStateNone . NONE
6363 state_on_args : Optional [dict [str , Any ]] = None
64- state_off : Optional [ AsusState ] = None
64+ state_off : AsusState = AsusStateNone . NONE
6565 state_off_args : Optional [dict [str , Any ]] = None
6666
6767 state_expect_modify : bool = False
@@ -71,7 +71,7 @@ class ARSwitchDescription(AREntityDescription, SwitchEntityDescription):
7171class ARButtonDescription (AREntityDescription , ButtonEntityDescription ):
7272 """Describe AsusRouter button."""
7373
74- state : Optional [ str ] = None
74+ state : AsusState = AsusStateNone . NONE
7575 state_args : Optional [dict [str , Any ]] = None
7676 state_expect_modify : bool = False
7777
0 commit comments