Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Handle module errors more robustly and add query params to light preset and transition #1043

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

Merged
merged 1 commit into from
Jul 4, 2024

Conversation

sdb9696
Copy link
Collaborator

@sdb9696 sdb9696 commented Jul 4, 2024

Cherry pick of #1036 to patch

…et and transition (#1036)

Ensures that all modules try to access their data in `_post_update_hook` in a safe manner and disable themselves if there's an error.
Also adds parameters to get_preset_rules and get_on_off_gradually_info to fix issues with recent firmware updates.
[#1033](#1033)
Copy link

codecov bot commented Jul 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.49%. Comparing base (2f24797) to head (9bf9cd9).
Report is 9 commits behind head on patch.

Additional details and impacted files
@@            Coverage Diff             @@
##            patch    #1043      +/-   ##
==========================================
+ Coverage   91.44%   91.49%   +0.05%     
==========================================
  Files          84       84              
  Lines        5739     5775      +36     
  Branches     1395     1400       +5     
==========================================
+ Hits         5248     5284      +36     
  Misses        382      382              
  Partials      109      109              

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

@sdb9696 sdb9696 merged commit fe116ea into patch Jul 4, 2024
25 checks passed
@sdb9696 sdb9696 deleted the patch_fix/ks225_module_errors branch July 4, 2024 07:29
@sdb9696 sdb9696 added the bug Something isn't working label Jul 4, 2024
@sdb9696 sdb9696 added this to the 0.7.0.3 milestone Jul 4, 2024
@sdb9696 sdb9696 mentioned this pull request Jul 4, 2024
sdb9696 added a commit that referenced this pull request Jul 4, 2024
## [0.7.0.3](https://github.com/python-kasa/python-kasa/tree/0.7.0.3) (2024-07-04)

[Full Changelog](0.7.0.2...0.7.0.3)

Critical bugfix for issue #1033 with ks225 and S505D light preset module errors.
Partially fixes light preset module errors with L920 and L930.

**Fixed bugs:**

Handle module errors more robustly and add query params to light preset and transition [\#1043](#1043)
rytilahti pushed a commit that referenced this pull request Jul 4, 2024
Fixes the residual issues with the light preset module not handling
unexpected `lighting_effect` items in the presets list.

Completes the fixes started with PR
#1043 to fix
#1040, [HA
#121115](home-assistant/core#121115) and [HA
#121119](home-assistant/core#121119)

With this PR affected devices will no longer have the light preset
functionality disabled. As this is a new feature this does not warrant a
hotfix so will go into the next release.

Updated fixture for testing thanks to @szssamuel, many thanks!
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.

1 participant