Update dump_devinfo to include 20002 discovery results#556
Update dump_devinfo to include 20002 discovery results#556rytilahti merged 3 commits intopython-kasa:masterfrom
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #556 +/- ##
==========================================
+ Coverage 82.27% 82.29% +0.01%
==========================================
Files 30 30
Lines 2466 2468 +2
Branches 694 694
==========================================
+ Hits 2029 2031 +2
Misses 379 379
Partials 58 58 ☔ View full report in Codecov by Sentry. |
63c0dba to
a077f19
Compare
rytilahti
left a comment
There was a problem hiding this comment.
Some comments, I'll use this PR to create a fixture for my new L530 soon :-)
| "ssid", | ||
| "hw_id", | ||
| "fw_id", | ||
| "oem_id", |
There was a problem hiding this comment.
This looks good to me for now, but we will probably want to move the list of keys to scrub (including the ones below) into the library itself. This will allow removing the hardcoded list from homeassistant integration: https://github.com/home-assistant/core/blob/b36ddaa15c5975fbae36e2b4eef9721ef45f1a35/homeassistant/components/tplink/diagnostics.py#L14
rytilahti
left a comment
There was a problem hiding this comment.
Tested to work on KL130 and HS110 using the legacy, raises an error though after saving the results, unsure if related:
Exception ignored in: <function StreamWriter.__del__ at 0x7fcdb9dd8180>
Traceback (most recent call last):
File "/usr/lib/python3.11/asyncio/streams.py", line 395, in __del__
self.close()
File "/usr/lib/python3.11/asyncio/streams.py", line 343, in close
return self._transport.close()
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/asyncio/selector_events.py", line 860, in close
self._loop.call_soon(self._call_connection_lost, None)
File "/usr/lib/python3.11/asyncio/base_events.py", line 761, in call_soon
self._check_closed()
File "/usr/lib/python3.11/asyncio/base_events.py", line 519, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
b54dba6 to
ff76471
Compare
|
Thanks. I've rebased to master so should be ready to merge. |
Updated
dump_devinfoto capture the 20002 discovery result if present and save it in the fixtures file. This will be used for testing, for example to ensure that the correct fake protocol is used for tapo devices.N.B. dump_devinfo didn't seem to be working as it imported non-async
clickwhich isn't installed by poetry so I updated it toasync_click