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

Updating TS0042 using tuya general device name. #958

Merged
merged 6 commits into from
Aug 25, 2021
Merged

Updating TS0042 using tuya general device name. #958

merged 6 commits into from
Aug 25, 2021

Conversation

MattWestb
Copy link
Contributor

@MattWestb MattWestb commented Jul 11, 2021

Changing name to general tuya device.

Fixes #935, fixes #952

Changing name to general tuya device.
Using MODEL: "TS0044", and general tuya naming
@MattWestb
Copy link
Contributor Author

MattWestb commented Jul 11, 2021

Renaming the TS0042, TS0043 and TS0044 naming using general tuya name and using MODEL: "TS0044", for the TS0044.

Problems is then deleting the device IDs:
("_TZ3000_vp6clf9d", "TS0044"),
("_TZ3000_abci1hiu", "TS0044")],
("_TZ3000_vp6clf9d", "TS0044"),
is the test failing then its being used in the tests.

I like the change nit fixing the test is out of my knowledge ;-((

Can some dev helping fixing the test or i deleting the PR if its not interesting for the project.

@MattWestb
Copy link
Contributor Author

The problem is:

@pytest.mark.parametrize(
    "quirk, manufacturer",
    (
        (zhaquirks.tuya.ts0042.TuyaSmartRemote0042, "_TZ3000_owgcnkrh"),
        (zhaquirks.tuya.ts0042.TuyaSmartRemote0042, "_TZ3400_keyjhapk"),
        (zhaquirks.tuya.ts0042.TuyaSmartRemote0042, "_some_random_manuf"),
        (zhaquirks.tuya.ts0042.BenexmartRemote0042, "_TZ3000_adkvzooy"),
        (zhaquirks.tuya.ts0042.BenexmartRemote0042, "_TZ3400_keyjhapk"),
        (zhaquirks.tuya.ts0042.BenexmartRemote0042, "another random manufacturer"),
        (zhaquirks.tuya.ts0043.TuyaSmartRemote0043, "_TZ3000_bi6lpsew"),
        (zhaquirks.tuya.ts0043.TuyaSmartRemote0043, "_TZ3000_a7ouggvs"),
        (zhaquirks.tuya.ts0043.TuyaSmartRemote0043, "another random manufacturer"),
        (zhaquirks.tuya.ts0043.BenexmartRemote0043, "_TZ3000_qzjcsmar"),
        (zhaquirks.tuya.ts0043.BenexmartRemote0043, "another random manufacturer")

Shall i putting the new names for all with the manufacture name ?
And TS0041 and TTS0044 is missing in the test.

@MattWestb
Copy link
Contributor Author

MattWestb commented Jul 11, 2021

Is this the right way fixing the test ???

@pytest.mark.parametrize(
    "quirk, manufacturer",
    (
        (zhaquirks.tuya.ts0041.TuyaSmartRemote0041TI, "_some_random_manuf"),
        (zhaquirks.tuya.ts0041.TuyaSmartRemote0041TO, "another random manufacturer"),
        (zhaquirks.tuya.ts0042.TuyaSmartRemote0042TI, "another random manufacturer"),
        (zhaquirks.tuya.ts0042.TuyaSmartRemote0042TO, "another random manufacturer"),
        (zhaquirks.tuya.ts0043.TuyaSmartRemote0043TI, "another random manufacturer"),
        (zhaquirks.tuya.ts0043.TuyaSmartRemote0043TO, "another random manufacturer"),
        (zhaquirks.tuya.ts0044.TuyaSmartRemote0044TI, "another random manufacturer"),
        (zhaquirks.tuya.ts0044.TuyaSmartRemote0044TO, "another random manufacturer")

Fixed class names after renaming them.
One more try
@coveralls
Copy link

coveralls commented Jul 13, 2021

Pull Request Test Coverage Report for Build 1025565093

  • 6 of 6 (100.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.05%) to 82.555%

Totals Coverage Status
Change from base Build 1020113186: -0.05%
Covered Lines: 3961
Relevant Lines: 4798

💛 - Coveralls

@codecov-commenter
Copy link

codecov-commenter commented Jul 13, 2021

Codecov Report

Merging #958 (5211f80) into dev (302cf4c) will decrease coverage by 0.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #958      +/-   ##
==========================================
- Coverage   82.60%   82.55%   -0.06%     
==========================================
  Files         191      189       -2     
  Lines        4812     4798      -14     
==========================================
- Hits         3975     3961      -14     
  Misses        837      837              
Impacted Files Coverage Δ
zhaquirks/tuya/ts0042.py 100.00% <100.00%> (ø)
zhaquirks/tuya/ts0043.py 100.00% <100.00%> (ø)
zhaquirks/tuya/ts0044.py 100.00% <100.00%> (ø)
zhaquirks/tuya/ts0041.py 100.00% <0.00%> (ø)
zhaquirks/tuya/ts0041_zemismart.py
zhaquirks/tuya/ts0041_moes.py

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 302cf4c...5211f80. Read the comment docs.

Added test for 41 and 44
@MattWestb
Copy link
Contributor Author

Was trying getting the test Coverage up be adding the 41 and 44 variant but i dont knowing if its helping.

More feedback is needed if I shall doing more changes or if its OK then merger.

Mvh MW

@MattWestb MattWestb marked this pull request as ready for review July 13, 2021 07:07
@MattWestb
Copy link
Contributor Author

MattWestb commented Jul 28, 2021

Fixes #935

@MattWestb
Copy link
Contributor Author

MattWestb commented Aug 3, 2021

Fixes #952 that is not committed (one more TS0044).

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] TS0044 _TZ3000_dku2cfsc
4 participants