-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Conversation
devices/tuya.js
Outdated
fingerprint: [ | ||
{modelID: 'TS0601', manufacturerName: '_TZE200_3p5ydos3'}, | ||
], | ||
model: 'TS0601_dimmer', |
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 expect that the other TS0601_dimmer
will also support this feature (if not we can always split them later)
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 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...
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.
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',
)
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.
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.
…-converters into TZE200_3p5ydos3
thanks! |
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).