-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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(add): MiBoxer TR-C1ZR dimmer https://github.com/Koenkk/zigbee2mq… #7638
Conversation
src/lib/tuya.ts
Outdated
@@ -1684,8 +1693,8 @@ const tuyaModernExtend = { | |||
return tuyaModernExtend.dpEnumLookup({name: 'power_on_behavior', lookup: lookup, type: dataTypes.enum, | |||
expose: e.power_on_behavior(Object.keys(lookup)).withAccess(readOnly ? ea.STATE : ea.STATE_SET), ...args}); | |||
}, | |||
tuyaLight(args?: modernExtend.LightArgs & {minBrightness?: boolean, switchType?: boolean}) { | |||
args = {minBrightness: false, powerOnBehavior: false, switchType: false, ...args}; | |||
tuyaLight(args?: modernExtend.LightArgs & {minBrightness?: boolean, minBrightness2?: boolean, switchType?: boolean}) { |
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.
tuyaLight(args?: modernExtend.LightArgs & {minBrightness?: boolean, minBrightness2?: boolean, switchType?: boolean}) { | |
tuyaLight(args?: modernExtend.LightArgs & {minBrightness?: 'attribute' | 'command', switchType?: boolean}) { |
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 added also "none" for devices that cannot set minimum brightness. Not sure if that is right.
Thanks for the suggestions. I updated the commit. I was able to capture the attribute that the Tuya gateway is requesting and I could add it to Z2M, but strangely the response contains the value in the position of the data type, causing errors like:
With the |
Thanks! |
This is an attempt to add support for the MiBoxer dimmer requested in Koenkk/zigbee2mqtt#19141.
It depends on Koenkk/zigbee-herdsman#1090.
I'm not sure if it this is the right approach. I don't really know what I'm doing here. At least one missing piece is reading the minimum brightness back. Suggestions welcome.