From 81089ff51df4f33db2b15e7ba0b926a3027cfb58 Mon Sep 17 00:00:00 2001 From: Julien Lebot Date: Mon, 22 May 2023 15:36:57 +0200 Subject: [PATCH] feat(add): 199182 (#5768) --- src/devices/legrand.js | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/devices/legrand.js b/src/devices/legrand.js index 8322b0f32f77d..dc713bf1c967e 100644 --- a/src/devices/legrand.js +++ b/src/devices/legrand.js @@ -257,6 +257,35 @@ module.exports = [ await reporting.brightness(endpoint); }, }, + { + zigbeeModel: [' Dimmer switch w/o neutral evo\u0000'], + model: '199182', + vendor: 'Legrand', + description: 'Wired switch without neutral', + extend: extend.light_onoff_brightness({noConfigure: true}), + fromZigbee: [fz.brightness, fz.identify, fz.on_off, fz.lighting_ballast_configuration, fz.legrand_cluster_fc01, + fz.power_on_behavior], + toZigbee: [tz.light_onoff_brightness, tz.legrand_settingEnableLedInDark, tz.legrand_settingEnableLedIfOn, + tz.legrand_deviceMode, tz.legrand_identify, tz.ballast_config, tz.power_on_behavior], + exposes: [e.light_brightness(), + exposes.numeric('ballast_minimum_level', ea.ALL).withValueMin(1).withValueMax(254) + .withDescription('Specifies the minimum brightness value'), + exposes.numeric('ballast_maximum_level', ea.ALL).withValueMin(1).withValueMax(254) + .withDescription('Specifies the maximum brightness value'), + exposes.binary('device_mode', ea.ALL, 'dimmer_on', 'dimmer_off').withDescription('Allow the device to change brightness'), + exposes.binary('led_in_dark', ea.ALL, 'ON', 'OFF').withDescription(`Enables the LED when the light is turned off, allowing to` + + ` see the switch in the dark`), + exposes.binary('led_if_on', ea.ALL, 'ON', 'OFF').withDescription('Enables the LED when the light is turned on'), + e.power_on_behavior()], + configure: async (device, coordinatorEndpoint, logger) => { + await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger); + const endpoint = device.getEndpoint(1); + await reporting.bind(endpoint, coordinatorEndpoint, ['genIdentify', 'genOnOff', 'genLevelCtrl', + 'genBinaryInput', 'lightingBallastCfg']); + await reporting.onOff(endpoint); + await reporting.brightness(endpoint); + }, + }, { zigbeeModel: [' Connected outlet\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000'], model: '067775/741811',