-
Notifications
You must be signed in to change notification settings - Fork 727
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
Add Avatto thermostats (Tuya) #3748
base: dev
Are you sure you want to change the base?
Add Avatto thermostats (Tuya) #3748
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #3748 +/- ##
==========================================
+ Coverage 90.13% 90.16% +0.03%
==========================================
Files 320 320
Lines 10473 10508 +35
==========================================
+ Hits 9440 9475 +35
Misses 1033 1033 ☔ View full report in Codecov by Sentry. |
I've tested this quirk with my_TZE284_xnbkhhdr, it works quite well however the time is not set on the device, it keeps trying to sync, due that there are a excessive number of messages". In Z2M this device works flawless (time is synced and no excessive number of messages). This devices is configured with "respondToMcuVersionResponse: false", as I've also seen in another issue it makes a difference :
|
@delaosa Thanks for the feedback! This should address both of your points. |
I cannot test it since .add_to_registry(replacement_cluster=NoManufTimeNoVersionRespTuyaMCUCluster) is not supported in my HA installation, guessing this feature hasn't be released yet. However I've tested updating TUYA_SET_TIME command in tuya/mcu/init.py with is_manufacturer_specific=False and time sync is working. Thanks! Updating temperature or turning off/on the thermostat from HA is not working, to fix it I've added the following code to 'TuyaThermostat' class:
|
.tuya_switch( | ||
dp_id=103, | ||
attribute_name="factory_reset", | ||
translation_key="factory_reset", | ||
fallback_name="Factory reset", | ||
) |
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.
I guess this could be changed to a button (in the future)?
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.
Likely, I was also wondering if we should even expose a factory reset by default...
FifteenMin = 0x00 | ||
ThirtyMin = 0x01 | ||
FortyFiveMin = 0x02 | ||
SixtyMin = 0x03 | ||
NinetyMin = 0x04 |
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.
I think other enums include the number like _90_min
or Min_90
? Do we want to do this here and for the enums below where numbers are spelled out at the moment?
In the future, we'll try to make enums translatable with zigpy/zha#86.
These would act as the translation key then. Just fyi if this affects your decision.
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.
We can also merge them like this for now and streamline all enums in another PR, but we'd need to do that before the 2025.2.0 beta release date, so we don't mess up any actual HA entities.
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.
PR seems fine otherwise.
Proposed change
Adds Tuya ZWT198/ZWT100-BH Avatto wall thermostats
Closes: #3627
Closes: #3212
Closes: #2589
Closes: #3482
Closes: #3326
Additional information
Based on: Koenkk/zigbee2mqtt#25752
and https://github.com/Koenkk/zigbee-herdsman-converters/blob/40e72bc2515deb67ef35dddab04437342b7b3eb9/src/devices/tuya.ts#L7027
Checklist
pre-commit
checks pass / the code has been formatted using Black