Skip to content

Commit

Permalink
Mark xiaomi.repeater.v3 as supported for wifirepeater (#1812)
Browse files Browse the repository at this point in the history
This includes the config_router action required for xiaomi.repeater.v3
starts repeating.
  • Loading branch information
kebianizao authored Oct 4, 2023
1 parent 81d28ec commit 79d2685
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion miio/integrations/xiaomi/repeater/wifirepeater.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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),
Expand Down

0 comments on commit 79d2685

Please sign in to comment.