-
Notifications
You must be signed in to change notification settings - Fork 712
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
Clean up Danfoss TRV custom attributes definitions and commands #2150
Conversation
…unsupported ones. split up proprietary clusters. add preheat_command (no usage yet). force read before bind of cluster. Add 2 thermostat models. Refactoring
Pull Request Test Coverage Report for Build 4093705668
💛 - Coveralls |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #2150 +/- ##
==========================================
+ Coverage 87.91% 88.10% +0.19%
==========================================
Files 300 299 -1
Lines 9226 9358 +132
==========================================
+ Hits 8111 8245 +134
+ Misses 1115 1113 -2 ☔ View full report in Codecov by Sentry. |
…_scheduled, cluster_revision. Redirect reads from custom clusters. fix _update_attribute. Place SimpleDescriptor back. Move reads at bind to ZHA.
I fixed the merge-conflicts caused by the automatic checks. |
…umbers, fix some type issues, add a few tests
Converting to a draft, because the code changed a lot and needs to be retested with hardware. |
Thanks, I just responded to all feedback of the ZHA PR and this PR is ready. |
@Caius-Bonus Could this technically be merged without breaking any current user-exposed functionality even if the ZHA PR doesn't make it for the .3 release for some reason? |
It shouldn't break anything, because there are no entities in ZHA currently depending on this quirk. The original quirk just changed the way setpoint changes were done and that behaviour will be exactly identical. |
@TheJulianJES, there were a few issues with the checks not running correctly, but after 2 retries it works again. Ready for merge. |
@TheJulianJES do you know if this will make it into 2024.04?? I'm wondering whether to buy this device. Thanks :) Edit: Or 2024.05 :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trying to get this wrapped up (finally 😄 ). Few minor comments.
Also, can you rebase this once more? There were some ruff changes and I just want to make sure this PR still passes then.
I'll merge this then. For the custom functionality in ZHA, we should ideally try to move this into a v2 quirk afterwards. The docs aren't ready yet, but it's not that difficult. Most of the code (clusters and so on) stay the same. It's just the CustomDevice
that gets modified. But again, that's for another PR, not this one.
It would allow us to move all/most of the functionality from your HA/ZHA PR into quirks directly which also makes future changes way easier, as it's all in quirks.
Co-authored-by: TheJulianJES <[email protected]>
Co-authored-by: TheJulianJES <[email protected]>
@TheJulianJES Ready |
@Mikaka27 Keep in mind that even when this is merged, home-assistant/core#86907 needs to be merged before this is useful in home assistant. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
The timezone stuff also looks cleaner now.
Codecov is still broken, but three lines are not covered by tests. I'm guessing this is another case of the "write time" stuff with
|
…y#2150) Danfoss thermostat: Fix attributes access, types, names and remove unsupported ones. split up proprietary clusters. add preheat_command (no usage yet). force read before bind of cluster. Add 2 thermostat models. Refactoring --------- Co-authored-by: TheJulianJES <[email protected]>
This PR refactors and improves the quirk to make it possible to add binary_sensors, sensors, switches, numbers and selects in the ZHA integration.
Main changes:1. It splits up the custom clusters into proprietary clusters with ids. This makes it so that ZHA doesn't need to know which models and vendors are supported. It only needs to know the cluster names.Miscellaneous:
This might break some users using ZHA clusters to address the TRV
In ZHA I added this complementary PR: home-assistant/core#86907
This PR will have an effect on the following issues:
#2115 (I don't know what could cause this, but it might change)
#1726 (It will now have this)
#717 (It will now have this)
#2728 (It will now have this)
sources (I appreciate the documentation and updates):
The initial version is based on the following documentation: https://web.archive.org/web/20231215170505/https://assets.danfoss.com/documents/202524/AU417130778872en-000101.pdf (old revision), https://assets.danfoss.com/documents/367874/AU417130778872en-000102.pdf (new revision)
Other documentation used is: https://assets.danfoss.com/documents/284715/AM375549618098en-000103.pdf
Source for information regarding the new revision in the firmware package: https://www.danfoss.com/nl-nl/products/dhs/smart-heating/smart-heating/danfoss-ally/danfoss-ally-support/#tab-software
This documentation contradicts information regarding programming_operation_mode. Because the 2nd documentation seems more precise and supports both the old and the new G-serial TRVs, this version will be used