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
Implement handle_set_time_request
in TuyaMCUCluster
#1737
Conversation
Fully implement the `handle_set_time_request` in `TuyaMCUCluster`. The code has been taken from the `TuyaManufCluster` and must have the same behavior that the already supported devices (`set_time_offset` and `set_time_local_offset`): * https://github.com/zigpy/zha-device-handlers/blob/dev/zhaquirks/tuya/__init__.py#L377-L398
@javicalle hi, isn't the |
Although I am becoming more and more certain that Tuya is not using the manufacturer code in any case, the implementation according to the specifications should use it. That's why we don't override it here. The cases where it has been detected that it is necessary to override it, we do it with the It can be confusing to review the implementations because there are 2 architectures implementing the quirks. I am taking care of the one that uses the When I can fix the tests I will review your case and tell you how it would be implemented. |
I don't know why test coverage is failing.
🤷🏻♂️ |
Pull Request Test Coverage Report for Build 3123440246
💛 - Coveralls |
Codecov ReportBase: 71.56% // Head: 71.50% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## dev #1737 +/- ##
==========================================
- Coverage 71.56% 71.50% -0.07%
==========================================
Files 239 239
Lines 7358 7380 +22
==========================================
+ Hits 5266 5277 +11
- Misses 2092 2103 +11
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. |
I desist from trying to fix the coverage, although I don't know if that could be a problem in future PRs (if this PR is merged without complying with, any future PRs, it will not comply). I can't understand how can the coverage be lower than before, or why complain about code that in my local environment is covereded. I'm going to try to review the tests of the Tuya devices in another PR because I don't see the point in continuing to add tests that are not related to the PR. |
I’ll take a peek in a bit. |
Now all the checks are OK. |
Thanks David |
Fully implement the
handle_set_time_request
inTuyaMCUCluster
.The code has been taken from the
TuyaManufCluster
and must have the same behavior that the already supported devices (set_time_offset
andset_time_local_offset
):Related to: #1702
All credit goes to @RhavoX who perform the first code and tests.