Implement wifi interface for tapodevice (#606)

* Implement wifi interface for tapodevice

* Implement wifi_join

Tested to work on P110

* Fix linting
This commit is contained in:
Teemu R
2024-01-03 22:45:16 +01:00
committed by GitHub
parent c810298b04
commit 3692e4812f
3 changed files with 84 additions and 7 deletions

View File

@@ -345,10 +345,10 @@ async def scan(dev):
@wifi.command()
@click.argument("ssid")
@click.option("--keytype", prompt=True)
@click.option("--password", prompt=True, hide_input=True)
@click.option("--keytype", default=3)
@pass_dev
async def join(dev: SmartDevice, ssid, password, keytype):
async def join(dev: SmartDevice, ssid: str, password: str, keytype: str):
"""Join the given wifi network."""
echo(f"Asking the device to connect to {ssid}..")
res = await dev.wifi_join(ssid, password, keytype=keytype)