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 power on state for BlitzWolf Tuya plugs #742

Merged
merged 1 commit into from
Jan 23, 2021

Conversation

TheJulianJES
Copy link
Collaborator

@TheJulianJES TheJulianJES commented Jan 23, 2021

See #605 (comment)

This is tested and working.

This adds the option to change the default power on state for the BlitzWolf Tuya plugs.
I don't know of any other Tuya plugs that also support this. That's one of the reasons I didn't move OnOffRestorePowerCluster and PowerOnState in the __init__.py file in the Tuya directory.
The second reason is that it doesn't look like this plugs needs any Tuya-specific handling (and there is already a TuyaManufacturerClusterOnOff in tuya\__init.py__.
I can move (and rename?) the PowerOnState and OnOffRestorePowerCluster if that would be better.

Also, manufacturer_attributes cannot be used in the OnOffRestorePowerCluster.

@codecov-io
Copy link

Codecov Report

Merging #742 (3f0a49f) into dev (4f14ef0) will increase coverage by 0.07%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #742      +/-   ##
==========================================
+ Coverage   82.95%   83.02%   +0.07%     
==========================================
  Files         176      177       +1     
  Lines        3931     3948      +17     
==========================================
+ Hits         3261     3278      +17     
  Misses        670      670              
Impacted Files Coverage Δ
zhaquirks/tuya/plug.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4f14ef0...3f0a49f. Read the comment docs.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 505906587

  • 17 of 17 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.07%) to 83.029%

Totals Coverage Status
Change from base Build 503912949: 0.07%
Covered Lines: 3278
Relevant Lines: 3948

💛 - Coveralls

@Adminiuga Adminiuga merged commit b65f147 into zigpy:dev Jan 23, 2021
@TheJulianJES TheJulianJES deleted the blitzwolf_plug branch January 23, 2021 18:57
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.

4 participants