-
Notifications
You must be signed in to change notification settings - Fork 3k
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 legrand switch and shutter devices #8006
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -3,7 +3,7 @@ import tz from '../converters/toZigbee'; | |||||
import * as exposes from '../lib/exposes'; | ||||||
import * as legacy from '../lib/legacy'; | ||||||
import {eLegrand, fzLegrand, legrandOptions, readInitialBatteryState, tzLegrand} from '../lib/legrand'; | ||||||
import {deviceEndpoints, electricityMeter, light, onOff} from '../lib/modernExtend'; | ||||||
import {deviceEndpoints, electricityMeter, light, onOff, windowCovering} from '../lib/modernExtend'; | ||||||
import * as ota from '../lib/ota'; | ||||||
import * as reporting from '../lib/reporting'; | ||||||
import {DefinitionWithExtend} from '../lib/types'; | ||||||
|
@@ -697,6 +697,52 @@ const definitions: DefinitionWithExtend[] = [ | |||||
await reporting.onOff(endpoint); | ||||||
}, | ||||||
}, | ||||||
{ | ||||||
zigbeeModel: ['NLIS - Light switch'], | ||||||
model: 'NLIS - Light switch', | ||||||
vendor: 'Legrand', | ||||||
description: 'Light switch 1 gang Legrand', | ||||||
ota: ota.zigbeeOTA, | ||||||
toZigbee: [tzLegrand.led_mode], | ||||||
exposes: [eLegrand.ledInDark(), eLegrand.ledIfOn()], | ||||||
extend: [deviceEndpoints({endpoints: {l1: 1}}), light({configureReporting: true, endpointNames: ['l1']})], | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
}, | ||||||
{ | ||||||
zigbeeModel: ['NLIS - Double light switch'], | ||||||
model: 'NLIS - Double light switch', | ||||||
vendor: 'Legrand', | ||||||
description: 'Light switch 2 gang Legrand', | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove |
||||||
extend: [deviceEndpoints({endpoints: {l1: 1, l2: 2}}), light({configureReporting: true, endpointNames: ['l1', 'l2']})], | ||||||
}, | ||||||
{ | ||||||
zigbeeModel: ['NLIS - Triple light switch'], | ||||||
model: 'NLIS - Triple light switch', | ||||||
vendor: 'Legrand', | ||||||
description: 'Light switch 3 gang Legrand', | ||||||
ota: ota.zigbeeOTA, | ||||||
toZigbee: [tzLegrand.led_mode], | ||||||
exposes: [eLegrand.ledInDark(), eLegrand.ledIfOn()], | ||||||
extend: [deviceEndpoints({endpoints: {l1: 1, l2: 2, l3: 3}}), light({configureReporting: true, endpointNames: ['l1', 'l2', 'l3']})], | ||||||
}, | ||||||
{ | ||||||
zigbeeModel: ['NLIV - Double shutter switch'], | ||||||
model: 'NLIV - Double shutter switch', | ||||||
vendor: 'Legrand', | ||||||
description: 'Shutter switch 2 gang Legrand', | ||||||
ota: ota.zigbeeOTA, | ||||||
fromZigbee: [], | ||||||
toZigbee: [tzLegrand.shutter_switch_multi_gang, tzLegrand.led_mode], | ||||||
extend: [windowCovering({controls: ['lift', 'tilt']})], | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Does this work instead of |
||||||
exposes: [ | ||||||
eLegrand.ledIfOn(), | ||||||
e.enum('shutter_state', ea.STATE_SET, ['OPEN', 'CLOSE', 'STOP']).withEndpoint('l1'), | ||||||
e.enum('shutter_state', ea.STATE_SET, ['OPEN', 'CLOSE', 'STOP']).withEndpoint('l2'), | ||||||
], | ||||||
meta: {multiEndpoint: true}, | ||||||
endpoint: (device) => { | ||||||
return {l1: 1, l2: 2}; | ||||||
}, | ||||||
}, | ||||||
]; | ||||||
|
||||||
export default definitions; | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use the model numbers written on the device/product page (also use it in Koenkk/zigbee2mqtt.io#3030)