-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
ubisys: Allow to configure device inputs using templates #1658
ubisys: Allow to configure device inputs using templates #1658
Conversation
converters/toZigbee.js
Outdated
if (value.hasOwnProperty('inputActions')) { | ||
// example (default for C4): [[0,13,1,6,0,2], [1,13,2,6,0,2], [2,13,3,6,0,2], [3,13,4,6,0,2]] | ||
await devMgmtEp.write('manuSpecificUbisysDeviceSetup', | ||
{'inputActions': {elementType: 'octetStr', elements: value.inputActions}}); | ||
} | ||
|
||
if (value.hasOwnProperty('inputActionTemplates')) { |
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.
Thanks, can you make sure everything is snake case? e.g. inputActionTemplates
-> input_action_templates
.
converters/toZigbee.js
Outdated
inputActions = templateType.getInputActions(input, endpoint, template); | ||
} else { | ||
// scene(s) (always single input) | ||
if (!template.hasOwnProperty('sceneId')) { |
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.
Also sceneId
-> scene_id
, groupId
-> group_id
.
Note to self; after this merge Koenkk/zigbee2mqtt.io#420 |
666d0cf
to
2f9fd45
Compare
@Koenkk Should be ok like this, no? I also updated the docs PR accordingly. Only my branch name |
Perfect, thanks again! |
Nice! |
This makes general usage and especially direct ZigBee binding of the ubisys C4 a lot easier since there is no need anymore to dive into the raw input configuration attributes. It is also helpful for other ubisys devices to e.g. change the inputs from expecting push buttons to stationary switches.
Also see: Koenkk/zigbee2mqtt#3911 (comment)
Another PR for the documentation update will come in also in a few minutes.
Thanks,
Felix