FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Expose params field on TriggerLogs LogEntry by startlingdan · Pull Request #1697 · python-kasa/python-kasa · GitHub

Repository navigation

Expose params field on TriggerLogs LogEntry - #1697

Open
startlingdan wants to merge 1 commit into
python-kasa:masterfrom
startlingdan:expose-triggerlogs-params
Open

startlingdan wants to merge 1 commit into
python-kasa:masterfrom
startlingdan:expose-triggerlogs-params

Conversation

Copy link
Copy Markdown

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.

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 Bot commented May 16, 2026 •
edited
Loading

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.22%. Comparing base (76d9f68) to head (3c72624).
⚠️ Report is 24 commits behind head on master.

Additional details and impacted files
@@           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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

rytilahti added the enhancement New feature or request label Jul 5, 2026

rytilahti left a comment •
edited
Loading

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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.

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown

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.
If you are the author of this PR, please leave a comment if you want to keep it open. Also, please rebase your PR onto the latest dev branch to ensure that it's up to date with the latest changes.
Thank you for your contribution!

github-actions Bot added stale and removed stale labels Oct 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL