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

add generator for genBinaryOutput and genBinaryInput #7913

Merged
merged 2 commits into from
Aug 29, 2024

Conversation

tomaszduda23
Copy link
Contributor

@tomaszduda23 tomaszduda23 commented Aug 28, 2024

Implement generator for genBinaryOutput and genBinaryInput which was mentioned here Koenkk/zigbee2mqtt#23708

const {deviceEndpoints, binary} = require('zigbee-herdsman-converters/lib/modernExtend');

const definition = {
    zigbeeModel: ['v1'],
    model: 'v1',
    vendor: 'esphome',
    description: 'Automatically generated definition',
    extend: [deviceEndpoints({"endpoints":{"1":1,"2":2,"3":3,"4":4,"5":5,"6":6,"7":7,"8":8}}), binary({"name":"zigbee1","cluster":"genBinaryOutput","attribute":"presentValue","reporting":{"attribute":"presentValue","min":"MIN","max":"MAX","change":1},"valueOn":["ON",1],"valueOff":["OFF",0],"description":"binary_output_1","access":"ALL","endpointName":"1"}), binary({"name":"zigbee2","cluster":"genBinaryOutput","attribute":"presentValue","reporting":{"attribute":"presentValue","min":"MIN","max":"MAX","change":1},"valueOn":["ON",1],"valueOff":["OFF",0],"description":"binary_output_2","access":"ALL","endpointName":"2"}), binary({"name":"zigbee3","cluster":"genBinaryOutput","attribute":"presentValue","reporting":{"attribute":"presentValue","min":"MIN","max":"MAX","change":1},"valueOn":["ON",1],"valueOff":["OFF",0],"description":"binary_output_3","access":"ALL","endpointName":"3"}), binary({"name":"zigbee4","cluster":"genBinaryOutput","attribute":"presentValue","reporting":{"attribute":"presentValue","min":"MIN","max":"MAX","change":1},"valueOn":["ON",1],"valueOff":["OFF",0],"description":"binary_output_4","access":"ALL","endpointName":"4"}), binary({"name":"name_test1","cluster":"genBinaryInput","attribute":"presentValue","reporting":{"attribute":"presentValue","min":"MIN","max":"MAX","change":1},"valueOn":["ON",1],"valueOff":["OFF",0],"description":"binary_input_5","access":"STATE_GET","endpointName":"5"}), binary({"name":"name_test2","cluster":"genBinaryInput","attribute":"presentValue","reporting":{"attribute":"presentValue","min":"MIN","max":"MAX","change":1},"valueOn":["ON",1],"valueOff":["OFF",0],"description":"binary_input_6","access":"STATE_GET","endpointName":"6"}), binary({"name":"name_test3","cluster":"genBinaryInput","attribute":"presentValue","reporting":{"attribute":"presentValue","min":"MIN","max":"MAX","change":1},"valueOn":["ON",1],"valueOff":["OFF",0],"description":"binary_input_7","access":"STATE_GET","endpointName":"7"}), binary({"name":"name_test4","cluster":"genBinaryInput","attribute":"presentValue","reporting":{"attribute":"presentValue","min":"MIN","max":"MAX","change":1},"valueOn":["ON",1],"valueOff":["OFF",0],"description":"binary_input_8","access":"STATE_GET","endpointName":"8"})],
    meta: {"multiEndpoint":true},
};

module.exports = definition;

@Koenkk Koenkk merged commit 8a178b6 into Koenkk:master Aug 29, 2024
2 checks passed
@Koenkk
Copy link
Owner

Koenkk commented Aug 29, 2024

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.

2 participants