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

Min- and max-brightness for tuya dimmer _TZE200_3p5ydos3 #4047

Merged
merged 14 commits into from
Mar 30, 2022

Conversation

fschaeck
Copy link
Contributor

Added min- and max-brightness to tz.tuya_dimmer_level and used it for Tuya dimmer _TZE200_3p5ydos3, refactored fz.tuya_data_point_dump (moved some code into functions in lib/tuya.js) and added some logging to fz.tuya_dimmer (using those new functions in lib/tuya.js).

@fschaeck fschaeck changed the title Tze200 3p5ydos3 Min- and max-brightness for tuya dimmer _TZE200_3p5ydos3 Mar 26, 2022
devices/tuya.js Outdated
fingerprint: [
{modelID: 'TS0601', manufacturerName: '_TZE200_3p5ydos3'},
],
model: 'TS0601_dimmer',
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I expect that the other TS0601_dimmer will also support this feature (if not we can always split them later)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't dare changing the code for ALL Tuya dimmers, especially, since the min brightness of 3p5ydos3 is using the data point other dimmers are using as the brightness level...

Well... I moved the exposes definition of min- and max-brightness to the existing model TS0601_dimmer, but I think the better way would be to create a new model like TS0601_dimmer_with_min_max or alike...

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it doesn't work, it won't hurt right?

I think the description can be reverted again, no need to mention what features are support in the description since this is already documented in exposes ( description: 'Zigbee smart dimmer',)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay... I reverted the description, fixed the tests of tuya_data_point_dump in test/fromZigbee.test.js and corrected a bunch of Lint errors. All checks passed now.

@Koenkk Koenkk merged commit 733b693 into Koenkk:master Mar 30, 2022
@Koenkk
Copy link
Owner

Koenkk commented Mar 30, 2022

thanks!

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.

None yet

2 participants