Skip to content
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

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

Comment on lines +3589 to +3879
// '_TZE200_bvu2wnxz', /* model: 'ME167', vendor: 'AVATTO' */
// '_TZE200_6rdj8dzm', /* model: 'ME167', vendor: 'AVATTO' */
'_TZE200_p3dbf6qs', /* model: 'ME167', vendor: 'AVATTO' */
// '_TZE200_rxntag7i', /* model: 'ME168', vendor: 'AVATTO' */
Copy link
Author

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']),
Copy link
Author

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?

@Koenkk
Copy link
Owner

Koenkk commented Apr 18, 2024

A lot of thermostats where touched here, how can we ensure that they don't break?

@StefanLobbenmeier
Copy link
Author

StefanLobbenmeier commented Apr 18, 2024

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?

@StefanLobbenmeier
Copy link
Author

StefanLobbenmeier commented Apr 20, 2024

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

@Koenkk
Copy link
Owner

Koenkk commented Apr 21, 2024

@DaaaDave since you just added a new TS0601 thermostat in #7407, could you test this change out?

src/lib/tuya.ts Outdated Show resolved Hide resolved
src/lib/tuya.ts Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AVATTO ME168 - bad temperature values when schedule is selected
3 participants