Add https parameter to device class factory (#1184)

`SMART.TAPOHUB` resolves to different device classes based on the https value
This commit is contained in:
Steven B.
2024-10-22 18:09:35 +01:00
committed by GitHub
parent 3c865b5fb6
commit 048c84d72c
8 changed files with 73 additions and 23 deletions

View File

@@ -98,8 +98,8 @@ async def list(ctx):
echo(f"{infostr} {dev.alias}")
async def print_unsupported(unsupported_exception: UnsupportedDeviceError):
if res := unsupported_exception.discovery_result:
echo(f"{res.get('ip'):<15} UNSUPPORTED DEVICE")
if host := unsupported_exception.host:
echo(f"{host:<15} UNSUPPORTED DEVICE")
echo(f"{'HOST':<15} {'DEVICE FAMILY':<20} {'ENCRYPT':<7} {'ALIAS'}")
return await _discover(ctx, print_discovered, print_unsupported, do_echo=False)