forked from Koenkk/zigbee-herdsman-converters
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathenbrighten.js
91 lines (90 loc) · 3.61 KB
/
enbrighten.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
const fz = {...require('../converters/fromZigbee'), legacy: require('../lib/legacy').fromZigbee};
const reporting = require('../lib/reporting');
const extend = require('../lib/extend');
module.exports = [
{
zigbeeModel: ['43076'],
model: '43076',
vendor: 'Enbrighten',
description: 'Zigbee in-wall smart switch',
extend: extend.switch(),
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint = device.getEndpoint(1);
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
await reporting.onOff(endpoint);
},
},
{
zigbeeModel: ['43080'],
model: '43080',
vendor: 'Enbrighten',
description: 'Zigbee in-wall smart dimmer',
extend: extend.light_onoff_brightness({noConfigure: true}),
configure: async (device, coordinatorEndpoint, logger) => {
await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
const endpoint = device.getEndpoint(1);
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
await reporting.onOff(endpoint);
},
},
{
zigbeeModel: ['43102'],
model: '43102',
vendor: 'Enbrighten',
description: 'Zigbee in-wall outlet',
extend: extend.switch(),
},
{
zigbeeModel: ['43100'],
model: '43100',
vendor: 'Enbrighten',
description: 'Plug-in Zigbee outdoor smart switch',
extend: extend.switch(),
fromZigbee: [fz.command_on_state, fz.command_off_state],
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint1 = device.getEndpoint(1);
const endpoint2 = device.getEndpoint(2);
await reporting.bind(endpoint2, coordinatorEndpoint, ['genOnOff']);
await reporting.bind(endpoint1, coordinatorEndpoint, ['genOnOff']);
await reporting.onOff(endpoint1);
},
},
{
zigbeeModel: ['43082'],
model: '43082',
vendor: 'Enbrighten',
description: 'Zigbee in-wall smart dimmer',
extend: extend.light_onoff_brightness({disableEffect: true, noConfigure: true}),
configure: async (device, coordinatorEndpoint, logger) => {
await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
const endpoint = device.getEndpoint(1);
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
await reporting.onOff(endpoint);
},
},
{
zigbeeModel: ['43084'],
model: '43084',
vendor: 'Enbrighten',
description: 'Zigbee in-wall smart switch',
extend: extend.switch(),
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint = device.getEndpoint(1);
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
await reporting.onOff(endpoint);
},
},
{
zigbeeModel: ['43090'],
model: '43090',
vendor: 'Enbrighten',
description: 'Zigbee in-wall smart dimmer',
extend: extend.light_onoff_brightness({noConfigure: true}),
configure: async (device, coordinatorEndpoint, logger) => {
await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
const endpoint = device.getEndpoint(1);
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
await reporting.onOff(endpoint);
},
},
];