| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## master #1786 +/- ##
==========================================
+ Coverage 93.41% 93.43% +0.02%
==========================================
Files 159 159
Lines 10113 10116 +3
Branches 1043 1044 +1
==========================================
+ Hits 9447 9452 +5
+ Misses 472 471 -1
+ Partials 194 193 -1 ☔ View full report in Codecov by Harness.
|
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks @Smugaski, I saw that you mention that the discovery information is prepared manually, this is good to know!
I think this is good to go, but we should figure out a way to mark such manually maintained items to let the readers know that it is not a real device response. I will think on it a bit before merging, but if you have an idea, please feel free to let me know and/or adjust the fixture file.
Sorry, something went wrong.
The TD21 does not answer UDP discovery, so the discovery_result block is not a real device response. Add a _comment key next to error_code and result so readers can tell. The key sits outside the result dict that is parsed into the discovery model, and the fixture round-trip and discovery tests still pass.
|
Thanks for taking a look!
I'm happy to do either, or something different if you have a convention in mind. I didn't want to invent one in a fixture-only PR. Please let me know which you'd prefer, or if you have any other ideas in mind. |
Sorry, something went wrong.
|
Having a _comment sounds good, as it doesn't require checking the PR, thanks! I can adjust the other manually constructed fixtures to follow your example. |
Sorry, something went wrong.
|
Pushed the _comment to the PR. For reference, I put it directly inside discovery_result so it stays clear of the result dict that gets parsed. |
Sorry, something went wrong.
The CLI prints through rich, which wraps at 80 columns when output is not a terminal. The long comment wrapped and broke the exact-match comparison in test_discover_raw. Keep the comment short enough to stay on one line.
|
Pushed a small follow-up: the first _comment was too long and failed test_discover_raw in CI. kasa discover raw prints through rich, which wraps at 80 columns when output isn't a terminal, and the test compares the output exactly. I shortened it to "Manually created, not a real device response." (the line is 64 columns). Worth knowing for the other manually built fixtures: the whole printed line, including indentation, has to stay under 80 columns, so a short generic comment works best. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Add TD21(EU) device fixture
Adds a device fixture for the Tapo TD21 doorbell, hardware 2.0 (EU), firmware 1.1.5 Build 260423 Rel.6435n.
Changes
No library code changes were needed. The device connects over the existing smartcam protocol (SMART.TAPODOORBELL, AES over HTTPS on port 443) and is picked up as a Doorbell.
Notes
Testing
Not included
The device also reports ring, chimeCtrl, quickResponse and doorbellNightVision components. They are not exposed as features yet, and I left that for a separate change.