Browse Source

fix argument type hints of internal `{_ButtonAutomator,_CurtainMotor}.__init__`

Fabian Peter Hammerle 2 years ago
parent
commit
a508804751
1 changed files with 2 additions and 2 deletions
  1. 2 2
      switchbot_mqtt/__init__.py

+ 2 - 2
switchbot_mqtt/__init__.py

@@ -178,7 +178,7 @@ class _ButtonAutomator(_MQTTControlledActor):
     ]
 
     def __init__(
-        self, mac_address: str, retry_count: int, password: typing.Optional[None]
+        self, mac_address: str, retry_count: int, password: typing.Optional[str]
     ) -> None:
         self._device = switchbot.Switchbot(
             mac=mac_address, password=password, retry_count=retry_count
@@ -229,7 +229,7 @@ class _CurtainMotor(_MQTTControlledActor):
     ]
 
     def __init__(
-        self, mac_address: str, retry_count: int, password: typing.Optional[None]
+        self, mac_address: str, retry_count: int, password: typing.Optional[str]
     ) -> None:
         self._device = switchbot.SwitchbotCurtain(
             mac=mac_address, password=password, retry_count=retry_count