Skip to content

Commit

Permalink
Added led_in_dark FZ to all relevant Legrand + Bticino devices
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianMangold committed Aug 2, 2023
1 parent f09a0c5 commit c2b68df
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions src/devices/bticino.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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']),
Expand All @@ -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: [
Expand Down Expand Up @@ -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: [
Expand All @@ -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'])
Expand All @@ -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) => {
Expand Down
14 changes: 7 additions & 7 deletions src/devices/legrand.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down Expand Up @@ -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')],
Expand Down Expand Up @@ -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'),
Expand All @@ -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) => {
Expand All @@ -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` +
Expand All @@ -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(),
Expand Down Expand Up @@ -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']),
Expand Down

0 comments on commit c2b68df

Please sign in to comment.