-
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
feat: support Sunricher SR-ZG9030A-MW #8509
Conversation
], | ||
meta: {multiEndpoint: true}, | ||
toZigbee: [sunricher.tz.setModel], | ||
exposes: [e.enum('model', ea.SET, ['HK-DIM', 'ZG9030A-MW']).withDescription('Model of the device')], |
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.
Where is this used for? (what does changing the modelId
do)
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.
Some ZG9030A-MW
devices were mistakenly set with the modelId HK-DIM
during manufacturing. Therefore, we need to provide a method that allows users to update the modelId of these HK-DIM
devices to ZG9030A-MW
.
Thanks! |
Notably
While developing support for Sunricher devices, I discovered a ModelId conflict between two devices in their product line. To resolve this, I implemented an expose that allows users to switch the ModelId. This implementation required skipping the set/get access check in the test cases.
I'm not entirely confident if bypassing the test case through this approach is the best solution. I would appreciate your feedback and suggestions for potential improvements.
Reference code showing the ModelId conflict handling:
And the test case bypass: