diff --git a/miio/integrations/xiaomi/repeater/wifirepeater.py b/miio/integrations/xiaomi/repeater/wifirepeater.py index 37889d20a..2d719b48b 100644 --- a/miio/integrations/xiaomi/repeater/wifirepeater.py +++ b/miio/integrations/xiaomi/repeater/wifirepeater.py @@ -66,7 +66,7 @@ def ssid_hidden(self) -> bool: class WifiRepeater(Device): """Device class for Xiaomi Mi WiFi Repeater 2.""" - _supported_models = ["xiaomi.repeater.v2"] + _supported_models = ["xiaomi.repeater.v2", "xiaomi.repeater.v3"] @command( default_output=format_output( @@ -103,6 +103,22 @@ def set_wifi_roaming(self, wifi_roaming: bool): "miIO.switch_wifi_explorer", [{"wifi_explorer": int(wifi_roaming)}] ) + @command( + click.argument("ssid", type=str), + click.argument("password", type=str), + default_output=format_output("Updating the accespoint configuration"), + ) + def config_router(self, ssid: str, password: str): + """Update the configuration of the accesspoint.""" + return self.send( + "miIO.config_router", + { + "ssid": ssid, + "passwd": password, + "uid": 0, + }, + ) + @command( click.argument("ssid", type=str), click.argument("password", type=str),