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 Konke Light Years Switch #6278

Merged
merged 6 commits into from
Oct 13, 2023
Merged
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
67 changes: 56 additions & 11 deletions src/devices/konke.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,6 @@ const fzLocal = {
};

const definitions: Definition[] = [
{
zigbeeModel: ['3AFE292000068621'],
model: 'KK-LP-Q01D',
vendor: 'Konke',
description: '1 gang switch',
extend: extend.switch(),
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint1 = device.getEndpoint(1);
await reporting.bind(endpoint1, coordinatorEndpoint, ['genOnOff']);
},
},
{
zigbeeModel: ['3AFE170100510001', '3AFE280100510001'],
model: '2AJZ4KPKEY',
Expand Down Expand Up @@ -153,6 +142,62 @@ const definitions: Definition[] = [
toZigbee: [],
exposes: [e.contact(), e.battery_low(), e.tamper(), e.battery(), e.battery_voltage()],
},
{
zigbeeModel: ['3AFE292000068621'],
model: 'KK-LP-Q01D',
vendor: 'Konke',
description: 'Light years switch 1 gang',
extend: extend.switch(),
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint1 = device.getEndpoint(1);
await reporting.bind(endpoint1, coordinatorEndpoint, ['genOnOff']);
},
},
{
zigbeeModel: ['3AFE292000068622'],
model: 'KK-LP-Q02D',
vendor: 'Konke',
description: 'Light years switch 2 gangs',
extend: extend.switch(),
exposes: [e.switch().withEndpoint('l1'), e.switch().withEndpoint('l2')],
endpoint: (device) => {
return {l1: 1, l2: 2};
},
meta: {multiEndpoint: true},
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint1 = device.getEndpoint(1);
await reporting.bind(endpoint1, coordinatorEndpoint, ['genOnOff']);
const endpoint2 = device.getEndpoint(2);
await reporting.bind(endpoint2, coordinatorEndpoint, ['genOnOff']);
},
},
{
zigbeeModel: ['3AFE292000068623'],
model: 'KK-LP-Q03D',
vendor: 'Konke',
description: 'Light years switch 3 gangs',
extend: extend.switch(),
exposes: [e.switch().withEndpoint('l1'), e.switch().withEndpoint('l2'), e.switch().withEndpoint('l3')],
endpoint: (device) => {
return {l1: 1, l2: 2, l3: 3};
},
meta: {multiEndpoint: true},
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint1 = device.getEndpoint(1);
await reporting.bind(endpoint1, coordinatorEndpoint, ['genOnOff']);
const endpoint2 = device.getEndpoint(2);
await reporting.bind(endpoint2, coordinatorEndpoint, ['genOnOff']);
const endpoint3 = device.getEndpoint(3);
await reporting.bind(endpoint3, coordinatorEndpoint, ['genOnOff']);
},
},
{
zigbeeModel: ['3AFE2610010C0021'],
model: 'KK-QD-Y01w',
vendor: 'Konke',
description: 'Spotlight driver (cw mode)',
extend: extend.light_onoff_brightness_colortemp({colorTempRange: [153, 370]}),
},
];

module.exports = definitions;