Update dump_devinfo to include 20002 discovery results (#556)

* Fix dump_devinfo and add discovery_result to json

* Update following review.  Do not serialize aliases.

* Delete kasa/tests/fixtures/HS100(UK)_1.0_1.2.6.json
This commit is contained in:
sdb9696
2023-11-29 19:01:20 +00:00
committed by GitHub
parent 9728866afb
commit 9de3f69033
5 changed files with 74 additions and 41 deletions

View File

@@ -211,6 +211,7 @@ class SmartDevice:
# checks in accessors. the @updated_required decorator does not ensure
# mypy that these are not accessed incorrectly.
self._last_update: Any = None
self._discovery_info: Optional[Dict[str, Any]] = None
self._sys_info: Any = None # TODO: this is here to avoid changing tests
self._features: Set[str] = set()
@@ -371,6 +372,7 @@ class SmartDevice:
# This allows setting of some info properties directly
# from partial discovery info that will then be found
# by the requires_update decorator
self._discovery_info = info
self._set_sys_info(info)
def _set_sys_info(self, sys_info: Dict[str, Any]) -> None: