Improve CLI Discovery output (#583)

- Show discovery results for unsupported devices and devices that fail to authenticate.
- Rename `--show-unsupported` to `--verbose`.
- Remove separate `--timeout` parameter from cli discovery so it's not confused with `--timeout` now added to cli command.
- Add tests.
This commit is contained in:
sdb9696
2023-12-19 12:50:33 +00:00
committed by GitHub
parent 2e6c41d039
commit 209391c422
7 changed files with 298 additions and 55 deletions

View File

@@ -9,6 +9,10 @@ class SmartDeviceException(Exception):
class UnsupportedDeviceException(SmartDeviceException):
"""Exception for trying to connect to unsupported devices."""
def __init__(self, *args, discovery_result=None):
self.discovery_result = discovery_result
super().__init__(args)
class AuthenticationException(SmartDeviceException):
"""Base exception for device authentication errors."""