Skip to content
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

Add kwargs to LevelControl cluster command implementations #1796

Merged
merged 3 commits into from
Oct 3, 2022

Conversation

javicalle
Copy link
Collaborator

@javicalle javicalle commented Sep 30, 2022

In home-assistant/core#77676 some commands parameters has been replaced to keyword argument syntax.

Methods affected by the change:

  • _level_channel.move_to_level_with_on_off
  • _level_channel.move_to_level
  • _color_channel.color_loop_set
  • _color_channel.move_to_color_temp
  • _color_channel.enhanced_move_to_hue_and_saturation
  • _color_channel.move_to_hue_and_saturation
  • _color_channel.move_to_color
  • _identify_channel.trigger_effect

That changes breaks some implementations here.

After a quick review, I have added the **kwargs parameter in the command method related to the LevelControl cluster and related (NoManufacturerCluster).

Other implementations from other clusters have remained unchanged.

May fix: #1783

@coveralls
Copy link

coveralls commented Sep 30, 2022

Pull Request Test Coverage Report for Build 3165476503

  • 1 of 18 (5.56%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.1%) to 71.554%

Changes Missing Coverage Covered Lines Changed/Added Lines %
zhaquirks/tuya/mcu/init.py 0 5 0.0%
zhaquirks/tuya/init.py 0 6 0.0%
zhaquirks/tuya/ts110e.py 1 7 14.29%
Totals Coverage Status
Change from base Build 3165399005: -0.1%
Covered Lines: 5310
Relevant Lines: 7421

💛 - Coveralls

@codecov-commenter
Copy link

codecov-commenter commented Sep 30, 2022

Codecov Report

Base: 71.69% // Head: 71.55% // Decreases project coverage by -0.14% ⚠️

Coverage data is based on head (f586688) compared to base (aa476ad).
Patch coverage: 5.55% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1796      +/-   ##
==========================================
- Coverage   71.69%   71.55%   -0.15%     
==========================================
  Files         239      239              
  Lines        7406     7421      +15     
==========================================
  Hits         5310     5310              
- Misses       2096     2111      +15     
Impacted Files Coverage Δ
zhaquirks/tuya/__init__.py 53.57% <0.00%> (-0.49%) ⬇️
zhaquirks/tuya/mcu/__init__.py 50.27% <0.00%> (-1.40%) ⬇️
zhaquirks/tuya/ts110e.py 64.44% <14.28%> (-8.06%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@javicalle
Copy link
Collaborator Author

javicalle commented Oct 1, 2022

The home-assistant/core#79361 will NOT be covered by this PR.

@javicalle
Copy link
Collaborator Author

@dmulcahey, @puddly I looked at all the Cluster.command() in the library and I have fixed (or so I hope) all related to the LevelControl cluster.
I haven't found any command related to Color cluster (also affected in the ZHA PR).

And I don't know how address the home-assistant/core#79361 but I believe that is also related to the ZHA PR.

@TheJulianJES
Copy link
Collaborator

FYI regarding that KoF issue:
puddly already noticed that the base quirk class in zigpy doesn't use kwargs: https://github.com/zigpy/zigpy/blob/dev/zigpy/quirks/__init__.py#L184

@dmulcahey
Copy link
Collaborator

@javicalle can you rebase this please?

@javicalle
Copy link
Collaborator Author

@javicalle can you rebase this please?

Done.

@dmulcahey dmulcahey merged commit d40f0d3 into zigpy:dev Oct 3, 2022
@javicalle
Copy link
Collaborator Author

Thanks David

@javicalle javicalle deleted the add_kwargs_to_command branch October 3, 2022 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(Device support) - Moes ms-105z
5 participants