-
-
Notifications
You must be signed in to change notification settings - Fork 223
Update dump_devinfo to include 20002 discovery results #556
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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_devinfo
to 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
click
which isn't installed by poetry so I updated it toasync_click