| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
The S200B (Smart Button / dial) emits rotation events whose direction and magnitude live in `params.rotate_deg` (signed int, positive = clockwise, negative = anti-clockwise, magnitude in degrees). Today `LogEntry` strips the `params` field on parse, so callers can detect that a rotation happened but not which way. Add an optional `params: dict[str, Any] | None` field with default None. Fully backwards compatible (existing callers unaffected; events without params get None). Verified on a Tapo H100 firmware 1.6.1 with an S200B child: captured 9 events across `singleClick` and `rotation` types with the field exposed; `params.rotate_deg` populated for every rotation, absent for singleClick. Helps python-kasa#1117.
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## master #1697 +/- ##
=======================================
Coverage 93.22% 93.22%
=======================================
Files 157 157
Lines 9815 9816 +1
Branches 1003 1003
=======================================
+ Hits 9150 9151 +1
Misses 472 472
Partials 193 193 ☔ View full report in Codecov by Harness.
|
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks for the PR @startlingdan, the change looks straightforward, flaky CI on Windows is unrelated.
Given you know how the data looks like, could you already extract & parse it instead of passing it forward as raw data? Also, it would be great to have a fixture file showing this and tests for it.
Sorry, something went wrong.
|
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
The S200B (Smart Button / dial) emits rotation events whose direction and magnitude live in params.rotate_deg (signed int, positive = clockwise, negative = anti-clockwise, magnitude in degrees). Today LogEntry strips the params field on parse, so callers can detect that a rotation happened but not which way.
Add an optional params: dict[str, Any] | None field with default None. Fully backwards compatible (existing callers unaffected; events without params get None).
Verified on a Tapo H100 firmware 1.6.1 with an S200B child: captured 9 events across singleClick and rotation types with the field exposed; params.rotate_deg populated for every rotation, absent for singleClick.
Helps #1117.