Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark xiaomi.repeater.v3 as supported for wifirepeater #1812

Merged
merged 2 commits into from
Oct 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
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 @@
"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(

Check warning on line 113 in miio/integrations/xiaomi/repeater/wifirepeater.py

View check run for this annotation

Codecov / codecov/patch

miio/integrations/xiaomi/repeater/wifirepeater.py#L113

Added line #L113 was not covered by tests
"miIO.config_router",
{
"ssid": ssid,
"passwd": password,
"uid": 0,
},
)

@command(
click.argument("ssid", type=str),
click.argument("password", type=str),
Expand Down
Loading