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

Added Support of different DIGILUX Smart Home Touch Panels. #8263

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
147 changes: 147 additions & 0 deletions src/devices/digilux.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
const modernExtend_1 = require("../lib/modernExtend");
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please convert to .ts, example:

deviceEndpoints({endpoints: {'1': 1, '2': 2, '3': 3}, multiEndpointSkip: ['state', 'voltage', 'power', 'current', 'energy']}),

const exposes = require('zigbee-herdsman-converters/lib/exposes');
const fromZigbee = require("../converters/fromZigbee");
const toZigbee = require('../converters/toZigbee');
const e = exposes.presets;
const ea = exposes.access;
const definitions = [
{
zigbeeModel: ['DGL_ZB4S2D1F'],
model: 'DGL_ZB4S2D1F',
vendor: 'Digilux',
description: 'Digilux panel',
extend: [
modernExtend_1.deviceEndpoints({ endpoints: { '1': 1, '2': 2, '3' :3 , '4': 4, '5': 5, '6': 6, '7': 7} }),
modernExtend_1.onOff({ endpointNames: ['1', '2', '6', '7'] }),
modernExtend_1.light({ endpointNames: ['3', '4' , '5'] }),
],
meta:{multiEndpoint: true}
},
{
zigbeeModel: ['DGL_ZB8S0D1F'],
model: 'DGL_ZB8S0D1F',
vendor: 'Digilux',
description: 'Digilux panel',
extend: [
modernExtend_1.deviceEndpoints({ endpoints: { '1': 1, '2': 2, '3' :3 , '4': 4, '5': 5, '6': 6, '7': 7 ,'8' : 8, '9':9} }),
modernExtend_1.onOff({ endpointNames: ['1', '2', '3','4','5','6','7','8'] }),
modernExtend_1.light({ endpointNames: ['9'] }),
],
meta:{multiEndpoint: true}
},
{
zigbeeModel: ['DGL_ZB6S0D1F'],
model: 'DGL_ZB6S0D1F',
vendor: 'Digilux',
description: 'Digilux panel',
extend: [
modernExtend_1.deviceEndpoints({ endpoints: { '1': 1, '2': 2, '3' :3 , '4': 4, '5': 5, '6': 6, '7': 7} }),
modernExtend_1.onOff({ endpointNames: ['1', '2', '3','4','5','6'] }),
modernExtend_1.light({ endpointNames: ['7'] }),
],
meta:{multiEndpoint: true}
},
{
zigbeeModel: ['DGL_ZB4S0D1F'],
model: 'DGL_ZB4S0D1F',
vendor: 'Digilux',
description: 'Digilux panel',
extend: [
modernExtend_1.deviceEndpoints({ endpoints: { '1': 1, '2': 2, '3' :3 , '4': 4, '5': 5} }),
modernExtend_1.onOff({ endpointNames: ['1', '2', '3', '4'] }),
modernExtend_1.light({ endpointNames: ['5'] }),
],
meta:{multiEndpoint: true}
},
{
zigbeeModel: ['DGL_ZB2S1D1F'],
model: 'DGL_ZB2S1D1F',
vendor: 'Digilux',
description: 'Digilux panel',
extend: [
modernExtend_1.deviceEndpoints({ endpoints: { '1': 1, '2': 2, '3' :3 , '4': 4} }),
modernExtend_1.onOff({ endpointNames: ['1', '2'] }),
modernExtend_1.light({ endpointNames: ['3','4'] }),
],
meta:{multiEndpoint: true},
},
{
zigbeeModel: ['DGL_ZB2S1D0F'],
model: 'DGL_ZB2S1D0F',
vendor: 'Digilux',
description: 'Digilux panel',
extend: [
modernExtend_1.deviceEndpoints({ endpoints: { '1': 1, '2': 2, '3' :3} }),
modernExtend_1.onOff({ endpointNames: ['1', '2'] }),
modernExtend_1.light({ endpointNames: ['3'] }),
],
meta:{multiEndpoint: true},
},
{
zigbeeModel: ['DGL_ZB6S0D0F'],
model: 'DGL_ZB6S0D0F',
vendor: 'Digilux',
description: 'Digilux panel',
extend: [
modernExtend_1.deviceEndpoints({ endpoints: { '1': 1, '2': 2, '3' :3 , '4': 4, '5': 5, '6': 6} }),
modernExtend_1.onOff({ endpointNames: ['1', '2', '3','4','5','6'] }),
],
meta:{multiEndpoint: true},
},
{
zigbeeModel: ['DGL_ZBAS0D0F'],
model: 'DGL_ZBAS0D0F',
vendor: 'Digilux',
description: 'Digilux panel',
extend: [
modernExtend_1.deviceEndpoints({ endpoints: { '1': 1, '2': 2, '3' :3 , '4': 4, '5': 5, '6': 6, '7': 7 ,'8' : 8, '9':9 , '10':10} }),
modernExtend_1.onOff({ endpointNames: ['1', '2', '3','4','5','6','7','8','9' ,'10'] }),
],
meta:{multiEndpoint: true},
},
{
zigbeeModel: ['DGL_ZB8S0D0F'],
model: 'DGL_ZB8S0D0F',
vendor: 'Digilux',
description: 'Digilux panel',
extend: [
modernExtend_1.deviceEndpoints({ endpoints: { '1': 1, '2': 2, '3' :3 , '4': 4, '5': 5, '6': 6, '7': 7 ,'8' : 8} }),
modernExtend_1.onOff({ endpointNames: ['1', '2', '3','4','5','6','7','8'] }),
],
meta:{multiEndpoint: true},
},
{
zigbeeModel: ['DGL_ZB4S0D0F'],
model: 'DGL_ZB4S0D0F',
vendor: 'Digilux',
description: 'Digilux panel',
extend: [
modernExtend_1.deviceEndpoints({ endpoints: { '1': 1, '2': 2, '3' :3 , '4': 4} }),
modernExtend_1.onOff({ endpointNames: ['1', '2', '3','4'] }),
],
meta:{multiEndpoint: true},
},
{
zigbeeModel: ['DGL_ZB3S0D0F'],
model: 'DGL_ZB3S0D0F',
vendor: 'Digilux',
description: 'Digilux panel',
extend: [
modernExtend_1.deviceEndpoints({ endpoints: { '1': 1, '2': 2, '3' :3} }),
modernExtend_1.onOff({ endpointNames: ['1', '2', '3'] }),
],
meta:{multiEndpoint: true},
},
{
zigbeeModel: ['DGL_CCTDRIVER'],
model: 'DGL_CCTDRIVER',
vendor: 'Digilux',
description: 'Digilux panel',
extend: [
modernExtend_1.identify(),
modernExtend_1.light({colorTemp: {startup: false}}),
],
},
];
exports.default = definitions;
module.exports = definitions;
2 changes: 2 additions & 0 deletions src/devices/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
import dawon_dns from './dawon_dns';
import develco from './develco';
import digi from './digi';
import digilux from './digilux';

Check failure on line 59 in src/devices/index.ts

View workflow job for this annotation

GitHub Actions / ci

Could not find a declaration file for module './digilux'. '/home/runner/work/zigbee-herdsman-converters/zigbee-herdsman-converters/src/devices/digilux.js' implicitly has an 'any' type.
import diyruz from './diyruz';
import dlink from './dlink';
import dnake from './dnake';
Expand Down Expand Up @@ -368,6 +369,7 @@
...dawon_dns,
...develco,
...digi,
...digilux,
...diyruz,
...dlink,
...dnake,
Expand Down
Loading