diff --git a/src/devices/bticino.ts b/src/devices/bticino.ts index 9733d3330af43..1138f1f782f8b 100644 --- a/src/devices/bticino.ts +++ b/src/devices/bticino.ts @@ -13,7 +13,7 @@ const definitions: Definition[] = [ model: 'K4003C/L4003C/N4003C/NT4003C', vendor: 'BTicino', description: 'Light switch with neutral', - fromZigbee: [fz.identify, fz.on_off, fz.K4003C_binary_input, fz.legrand_cluster_fc01], + fromZigbee: [fz.identify, fz.on_off, fz.K4003C_binary_input, fz.legrand_cluster_fc01, fz.legrand_led_in_dark], toZigbee: [tz.on_off, tz.legrand_settingEnableLedInDark, tz.legrand_settingEnableLedIfOn, tz.legrand_identify], exposes: [ e.switch(), e.action(['identify', 'on', 'off']), @@ -33,7 +33,7 @@ const definitions: Definition[] = [ vendor: 'BTicino', description: 'Dimmer switch with neutral', extend: extend.light_onoff_brightness({noConfigure: true}), - fromZigbee: [fz.brightness, fz.identify, fz.on_off, fz.lighting_ballast_configuration, fz.legrand_cluster_fc01], + fromZigbee: [fz.brightness, fz.identify, fz.on_off, fz.lighting_ballast_configuration, fz.legrand_cluster_fc01, fz.legrand_led_in_dark], toZigbee: [tz.light_onoff_brightness, tz.legrand_settingEnableLedInDark, tz.legrand_settingEnableLedIfOn, tz.legrand_deviceMode, tz.legrand_identify, tz.ballast_config], exposes: [ @@ -67,7 +67,7 @@ const definitions: Definition[] = [ vendor: 'BTicino', description: 'Shutter SW with level control', fromZigbee: [fz.identify, fz.ignore_basic_report, fz.ignore_zclversion_read, fz.bticino_4027C_binary_input_moving, - fz.cover_position_tilt], + fz.cover_position_tilt, fz.legrand_led_in_dark], toZigbee: [tz.bticino_4027C_cover_state, tz.bticino_4027C_cover_position, tz.legrand_identify, tz.legrand_settingEnableLedInDark], exposes: [ @@ -88,7 +88,7 @@ const definitions: Definition[] = [ description: 'DIN power consumption module (same as Legrand 412015)', vendor: 'BTicino', extend: extend.switch(), - fromZigbee: [fz.identify, fz.on_off, fz.electrical_measurement, fz.legrand_cluster_fc01, fz.ignore_basic_report, fz.ignore_genOta], + fromZigbee: [fz.identify, fz.on_off, fz.electrical_measurement, fz.legrand_cluster_fc01, fz.ignore_basic_report, fz.ignore_genOta, fz.legrand_led_in_dark], toZigbee: [tz.legrand_deviceMode, tz.on_off, tz.legrand_identify, tz.electrical_measurement_power], exposes: [e.switch().withState('state', true, 'On/off (works only if device is in "switch" mode)'), e.power().withAccess(ea.STATE_GET), e.enum('device_mode', ea.ALL, ['switch', 'auto']) @@ -106,7 +106,7 @@ const definitions: Definition[] = [ model: 'L4531C', vendor: 'BTicino', description: 'Power socket with power consumption monitoring', - fromZigbee: [fz.identify, fz.on_off, fz.electrical_measurement], + fromZigbee: [fz.identify, fz.on_off, fz.electrical_measurement, fz.legrand_led_in_dark], toZigbee: [tz.on_off, tz.legrand_settingEnableLedInDark, tz.legrand_identify], exposes: [e.switch(), e.action(['identify']), e.power(), e.voltage(), e.current()], configure: async (device, coordinatorEndpoint, logger) => { diff --git a/src/devices/legrand.js b/src/devices/legrand.js index ee8ea2a80b1c8..b3378feb28649 100644 --- a/src/devices/legrand.js +++ b/src/devices/legrand.js @@ -301,7 +301,7 @@ module.exports = [ vendor: 'Legrand', ota: ota.zigbeeOTA, description: 'Power socket with power consumption monitoring', - fromZigbee: [fz.identify, fz.on_off, fz.electrical_measurement, fz.power_on_behavior], + fromZigbee: [fz.identify, fz.on_off, fz.electrical_measurement, fz.power_on_behavior, fz.legrand_led_in_dark], toZigbee: [tz.on_off, tz.legrand_settingEnableLedInDark, tz.legrand_identify, tz.legrand_settingEnableLedIfOn, tz.power_on_behavior], exposes: [e.switch(), e.action(['identify']), e.power(), e.power_apparent(), @@ -370,7 +370,7 @@ module.exports = [ model: '412015', vendor: 'Legrand', description: 'DIN power consumption module', - fromZigbee: [fz.identify, fz.metering, fz.electrical_measurement, fz.ignore_basic_report, fz.ignore_genOta, fz.legrand_power_alarm], + fromZigbee: [fz.identify, fz.metering, fz.electrical_measurement, fz.ignore_basic_report, fz.ignore_genOta, fz.legrand_power_alarm, fz.legrand_led_in_dark], toZigbee: [tz.legrand_settingEnableLedInDark, tz.legrand_identify, tz.electrical_measurement_power, tz.legrand_powerAlarm], exposes: [e.power().withAccess(ea.STATE_GET), e.power_apparent(), exposes.binary('power_alarm_active', ea.STATE, true, false), exposes.binary('power_alarm', ea.ALL, true, false).withDescription('Enable/disable the power alarm')], @@ -477,7 +477,7 @@ module.exports = [ vendor: 'Legrand', description: 'Double wired switch with neutral', ota: ota.zigbeeOTA, - fromZigbee: [fz.on_off, fz.legrand_binary_input_on_off, fz.legrand_cluster_fc01], + fromZigbee: [fz.on_off, fz.legrand_binary_input_on_off, fz.legrand_cluster_fc01, fz.legrand_led_in_dark], toZigbee: [tz.on_off, tz.legrand_settingEnableLedInDark, tz.legrand_settingEnableLedIfOn], exposes: [e.switch().withEndpoint('left'), e.switch().withEndpoint('right'), @@ -502,7 +502,7 @@ module.exports = [ vendor: 'Legrand', ota: ota.zigbeeOTA, description: 'Outlet with power consumption monitoring', - fromZigbee: [fz.identify, fz.on_off, fz.electrical_measurement], + fromZigbee: [fz.identify, fz.on_off, fz.electrical_measurement, fz.legrand_led_in_dark], toZigbee: [tz.on_off, tz.legrand_settingEnableLedInDark, tz.legrand_identify], exposes: [e.switch(), e.action(['identify']), e.power()], configure: async (device, coordinatorEndpoint, logger) => { @@ -518,7 +518,7 @@ module.exports = [ model: 'WNAL10/WNRL10', vendor: 'Legrand', description: 'Smart switch with Netatmo', - fromZigbee: [fz.on_off, fz.legrand_binary_input_on_off, fz.legrand_cluster_fc01], + fromZigbee: [fz.on_off, fz.legrand_binary_input_on_off, fz.legrand_cluster_fc01, fz.legrand_led_in_dark], toZigbee: [tz.on_off, tz.legrand_settingEnableLedInDark, tz.legrand_settingEnableLedIfOn], exposes: [e.switch(), exposes.binary('led_in_dark', ea.ALL, 'ON', 'OFF').withDescription(`Enables the LED when the light is turned off, allowing to` + @@ -537,7 +537,7 @@ module.exports = [ description: 'Smart dimmer switch with Netatmo', 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], + fz.power_on_behavior, fz.legrand_led_in_dark], 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(), @@ -583,7 +583,7 @@ module.exports = [ model: '067766', vendor: 'Legrand', description: 'Centralized ventilation switch', - fromZigbee: [fz.identify, fz.on_off, fz.power_on_behavior], + fromZigbee: [fz.identify, fz.on_off, fz.power_on_behavior, fz.legrand_led_in_dark], toZigbee: [tz.on_off, tz.legrand_settingEnableLedInDark, tz.legrand_identify, tz.legrand_settingEnableLedIfOn, tz.power_on_behavior], exposes: [e.switch(), e.action(['identify']),