Skip to content

Instantly share code, notes, and snippets.

@9zigen
Last active April 4, 2024 19:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 9zigen/d945911b632b432979d46973511d26ba to your computer and use it in GitHub Desktop.
Save 9zigen/d945911b632b432979d46973511d26ba to your computer and use it in GitHub Desktop.
const {deviceEndpoints, numeric, onOff, commandsOnOff, binary, quirkAddEndpointCluster} = require('zigbee-herdsman-converters/lib/modernExtend');
const definition = {
zigbeeModel: ['alab.switch'],
model: 'alab.switch',
vendor: 'Alab',
description: 'Four channel relay board with four inputs',
extend: [
deviceEndpoints({
endpoints: {"l1":1,"l2":2,"l3":3,"l4":4,"in1":5,"in2":6,"in3":7,"in4":8}}
),
onOff({
powerOnBehavior: false,
configureReporting: false,
endpointNames: ["l1","l2","l3","l4"]}
),
commandsOnOff({
endpointNames: ["l1","l2","l3","l4"]}
),
numeric({
name: "input_state",
cluster: "genAnalogInput",
attribute: "presentValue",
description: 'Input state',
endpointNames: ["in1","in2","in3","in4"]
})
],
meta: {"multiEndpoint":true}
};
module.exports = definition;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment