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

Update light transition module to work with child devices by sdb9696 · Pull Request #1017 · python-kasa/python-kasa · GitHub

Repository navigation

Update light transition module to work with child devices - #1017

Merged
sdb9696 merged 6 commits into
masterfrom
fix/child_transition
Jun 27, 2024
Merged

sdb9696 merged 6 commits into
masterfrom
fix/child_transition

Conversation

sdb9696 commented Jun 26, 2024 •
edited
Loading

Copy link
Copy Markdown
Contributor

The PR contains a few fixes and improvements for the LightTransition module:

  • Fixes it to work with child devices, i.e. ks240
  • Exposes a features to test for supported and allow getting the maximum values from the module interface
  • Interrogates the data to see whether maximums are available. Now possible with _post_update_hook
  • Fixes a bug whereby setting a duration while the feature is not enabled does not actually enable it.

N.B. the ks240 has component version 2 but does support the maximum values

codecov Bot commented Jun 26, 2024 •
edited
Loading

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 97.95918% with 1 line in your changes missing coverage. Please review.

Project coverage is 91.33%. Comparing base (cf24a94) to head (7638045).
Report is 78 commits behind head on master.

Files with missing lines Patch % Lines
kasa/smart/modules/lighttransition.py 97.87% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1017      +/-   ##
==========================================
+ Coverage   91.22%   91.33%   +0.11%     
==========================================
  Files          84       84              
  Lines        5638     5657      +19     
  Branches     1374     1371       -3     
==========================================
+ Hits         5143     5167      +24     
+ Misses        384      382       -2     
+ Partials      111      108       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment thread kasa/feature.py
Comment thread kasa/tests/fixtureinfo.py
Comment thread kasa/smart/modules/lighttransition.py Outdated
rytilahti added this to the 0.7.0.2 milestone Jun 26, 2024
Comment thread kasa/smart/modules/lighttransition.py Outdated
sdb9696 requested a review from rytilahti June 27, 2024 13:35
sdb9696 requested a review from rytilahti June 27, 2024 16:45

rytilahti left a comment

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

LGTM, tested to work with v1 L920 and V3 L530!

sdb9696 added the bug Something isn't working label Jun 27, 2024
sdb9696 merged commit 2a62849 into master Jun 27, 2024
sdb9696 deleted the fix/child_transition branch June 27, 2024 17:52
sdb9696 mentioned this pull request Jul 1, 2024
sdb9696 added a commit that referenced this pull request Jul 1, 2024
## [0.7.0.2](https://github.com/python-kasa/python-kasa/tree/0.7.0.2) (2024-07-01)

[Full Changelog](0.7.0.1...0.7.0.2)

This patch release fixes some minor issues found out during testing against all new homeassistant platforms.

**Fixed bugs:**

- Disable multi-request on unknown errors [\#1027](#1027) (@sdb9696)
- Disable multi requests on json decode error during multi-request [\#1025](#1025) (@sdb9696)
- Fix changing brightness when effect is active [\#1019](#1019) (@rytilahti)
- Update light transition module to work with child devices [\#1017](#1017) (@sdb9696)
- Handle unknown error codes gracefully [\#1016](#1016) (@rytilahti)

**Project maintenance:**

- Make parent attribute on device consistent across iot and smart [\#1023](#1023) (@sdb9696)
- Cache SmartErrorCode creation [\#1022](#1022) (@bdraco)
pillarsdotnet pushed a commit to pillarsdotnet/python-kasa that referenced this pull request Oct 22, 2026
…a#1017)

Fixes module to work with child devices, i.e. ks240
Interrogates the data to see whether maximums are available.
Fixes a bug whereby setting a duration while the feature is not
enabled does not actually enable it.
pillarsdotnet pushed a commit to pillarsdotnet/python-kasa that referenced this pull request Oct 22, 2026
## [0.7.0.2](https://github.com/python-kasa/python-kasa/tree/0.7.0.2) (2024-07-01)

[Full Changelog](python-kasa/python-kasa@0.7.0.1...0.7.0.2)

This patch release fixes some minor issues found out during testing against all new homeassistant platforms.

**Fixed bugs:**

- Disable multi-request on unknown errors [\python-kasa#1027](python-kasa#1027) (@sdb9696)
- Disable multi requests on json decode error during multi-request [\python-kasa#1025](python-kasa#1025) (@sdb9696)
- Fix changing brightness when effect is active [\python-kasa#1019](python-kasa#1019) (@rytilahti)
- Update light transition module to work with child devices [\python-kasa#1017](python-kasa#1017) (@sdb9696)
- Handle unknown error codes gracefully [\python-kasa#1016](python-kasa#1016) (@rytilahti)

**Project maintenance:**

- Make parent attribute on device consistent across iot and smart [\python-kasa#1023](python-kasa#1023) (@sdb9696)
- Cache SmartErrorCode creation [\python-kasa#1022](python-kasa#1022) (@bdraco)
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

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL