-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Fix me167 schedule #7406
base: master
Are you sure you want to change the base?
Fix me167 schedule #7406
Conversation
// '_TZE200_bvu2wnxz', /* model: 'ME167', vendor: 'AVATTO' */ | ||
// '_TZE200_6rdj8dzm', /* model: 'ME167', vendor: 'AVATTO' */ | ||
'_TZE200_p3dbf6qs', /* model: 'ME167', vendor: 'AVATTO' */ | ||
// '_TZE200_rxntag7i', /* model: 'ME168', vendor: 'AVATTO' */ |
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.
The patch worked for me with the fingerprint _TZE200_p3dbf6qs, I have no idea for the other devices. I will ask around in the ticket if someone needs an additional fingerprint here
fromZigbee: [tuya.fz.datapoints], | ||
toZigbee: [tuya.tz.datapoints], | ||
whiteLabel: [ | ||
tuya.whitelabel('AVATTO', 'ME167', 'Thermostatic radiator valve', ['_TZE200_p3dbf6qs']), |
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.
this makes the tests fail apparently, because there is another whitelabelled ME167. I am not sure how to deal with that though - do I just come up with another name for it?
A lot of thermostats where touched here, how can we ensure that they don't break? |
Good question. I broke it into atomic commits so you can verify that each of them leaves functionality unchanged. It’s pretty much just replacing the hardcoded 4 with a parameter so we can reuse the code with 6. Not sure if there is a way I can prove this with unit tests. The alternative is duplicating a lot of code, would you prefer that? |
I mean that as a genuine question btw - if that is preferred I can change the PR to basically only contain extra lines, except for moving the fingerprint, just thought it would be easier to maintain if we can reduce the existing code |
…tatScheduleDayMultiDPNWithDayNumber(4, $1
ba87d45
to
731e8d8
Compare
Fixes Koenkk/zigbee2mqtt#19787
Based on https://github.com/sychu/avatto_me167_TZE200_p3dbf6qs/tree/main