-
Notifications
You must be signed in to change notification settings - Fork 797
Add support for Sinope TH1134ZB-HC thermostat #3821
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #3821 +/- ##
==========================================
+ Coverage 89.85% 91.47% +1.61%
==========================================
Files 322 337 +15
Lines 10380 11841 +1461
==========================================
+ Hits 9327 10831 +1504
+ Misses 1053 1010 -43 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Can you explain how to add reporting configuration for new devices in ZHA or in the quirks ? I have all reporting configuration data for Sinopé devices and would like to add this to ZHA or the quirks. |
I'm ready to help for the v2 quirk if you want |
As an initial example, something like this would replace the v1 quirk from this PR: (
QuirkBuilder(SINOPE, "TH1134ZB-HC")
.replaces(SinopeTechnologiesElectricalMeasurementCluster)
.replaces(SinopeTechnologiesThermostatCluster)
.replaces(SinopeTechnologiesManufacturerCluster)
.add_to_registry()
) But no custom entities are added with that and no reporting config is applied. For that, see the IKEA example linked below. For other examples, search Do note that |
Thank you for the info, sorry I was away since three days. I'm testing the Sinope devices quirks via files loaded in config/zhaquirks. (custom_quirks_path: /config/zhaquirks/). Do you know if I switch all quirks for thermostats, light, switch and sensor to V2 I'll be able to use the same method to test the changes before I'll push a PR. |
About the V2 transfer. If I understand correctly I only need to add sensor, number, switch, select and/or binary sensor for attributes in manufacturer cluster or attributes added to regular cluster. For regular cluster those sensor, number, switch, select and binary sensor will be already added for new device added to ZHA. |
Forget about RM3250ZB-V2, I've found it |
@TheJulianJES I've ported all Sinopé quirks to quirks V2. Almost ready to make a PR. For now all file are in https://github.com/claudegel/sinope-zha/tree/quirks-V2. If you can have a look before I push the PR it will be appreciated. |
From a very quick look, it seems like good work. Feel free to already create the PR(s), as it's easier to review/comment for me and other reviewers then. Do note that ZHA will still create its (default) entities, even with quirks v2. There are ways to "become" an old ZHA entity by including the cluster ID in .prevent_default_entity_creation(endpoint_id=1, cluster_id=OnOff.cluster_id) |
@TheJulianJES I agree that ZHA should take care of default entities but some manufacturer specific cluster (0xff01) attributes are already managed by ZHA. Like the on_led_color, off_led_color, on_led_intensity and off_led_intensity. Normally they should be part of the new quirks ? Maybe you can help me with another of my custom component. Can you point me to where is the code to add those new sensor, button, binary_sensor etc to the device page. In my other custom_component I can create all the sensors etc from device attribute but didn't succeed to get them added to the main device page. Thank you for your help. |
Yes, those need to stay in ZHA for now. ZHA finds them by attribute name, so they have to stay the same.
So, all v2 quirk entities will show up on the device page of a ZHA device. By default, most are in the configuration section, not the main section. The configuration and diagnostics section/categories won't be show on auto-generated Home Assistant interfaces. That's expected. If you want to categorize some of the entities differently, you should be able to add |
Ijust finish to debug my V2 quirks for all Sinopé devices. I'll push a PR this week. Do you want me to replace this PR or make another one and at the end we will remove this one as it is useless for V2. I already port the TH1134ZB-HC to V2. |
It doesn't really matter, but a new PR might make sense, since it'll be quite different from this one and we can have a fresh conversation then. |
Look like there is a bug with the number entities creation. when I add this in my quirks V2:
I get this error:
|
Ugh, that's an issue in ZHA. It's using the wrong number class for the quirks v2 entities in the discovery schema, although the Try to remove the |
Removing the line entity_type=EntityType.CONFIG, didn't fix it sorry. Will check on my side also |
I just push a new PR #4042 to port all Sinopé devices to V2 and it include support for the devices included in this PR. |
So I'll close this one as it is replaced by PR 4042. Thank you for your help. |
Proposed change
Add support for the new TH1134ZB-HC Sinope thermostat. Added many attributes and support for weather icon control on thermostat display.
Additional information
Checklist
pre-commit
checks pass / the code has been formatted using Black