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

TS0201_Zemismart Quirk #989

Merged
merged 3 commits into from
Aug 22, 2021
Merged

Conversation

marciogranzotto
Copy link
Contributor

Fixes #988

I tried the solution proposed in the issue, but the problem what that the Device's NodeDescriptor has the MainsPowered flag set.
Clearing the flag whenever the node_descriptor is queried seems to fix the problem!

@MattWestb
Copy link
Contributor

I think that is the right way to do it then the attribute is being sent OK by the device.

You can also defining the manufacture cluster if you like and dont need the hex number of it but is not needed if we is not using it in the future.

Im not one code worrier do i can only helping with ideas but it can being good some times :-))

Great work done Marcio !!

@marciogranzotto
Copy link
Contributor Author

@MattWestb Thanks! Can we merge this?

@MattWestb
Copy link
Contributor

I cant but the devs can but i dont knowing way they is not merger ready PR that the user need for getting there devices working OK in there systems.

By the way great work done !!!

@marciogranzotto
Copy link
Contributor Author

Maybe @Adminiuga can take a check if can be merged?

@Adminiuga
Copy link
Contributor

Just override the node descriptor in replacement dict

@codecov-commenter
Copy link

codecov-commenter commented Aug 22, 2021

Codecov Report

Merging #989 (5178bc6) into dev (8c61c6d) will increase coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #989      +/-   ##
==========================================
+ Coverage   82.55%   82.58%   +0.03%     
==========================================
  Files         189      190       +1     
  Lines        4798     4807       +9     
==========================================
+ Hits         3961     3970       +9     
  Misses        837      837              
Impacted Files Coverage Δ
zhaquirks/tuya/ts0201_zemismart.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 8c61c6d...5178bc6. Read the comment docs.

@coveralls
Copy link

coveralls commented Aug 22, 2021

Pull Request Test Coverage Report for Build 1156493113

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

Totals Coverage Status
Change from base Build 1103007488: 0.03%
Covered Lines: 3970
Relevant Lines: 4807

💛 - Coveralls

@Adminiuga
Copy link
Contributor

Like in https://github.com/zigpy/zha-device-handlers/blob/dev/zhaquirks/heiman/smoke.py#L51

@marciogranzotto
Copy link
Contributor Author

@Adminiuga done! thanks, it looks way better

Copy link
Contributor

@Adminiuga Adminiuga left a comment

Choose a reason for hiding this comment

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

LGTM

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 Request] Zemismart Temperature & Humidity sensor ( _TZ3000_lfa05ajd TS0201 / ZXZTH)
5 participants