Skip to content

Commit 0f37143

Browse files
authored
feat: Niko 552-72201: add led enable & led state (#8975)
1 parent c9eb9b0 commit 0f37143

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/devices/niko.ts

+9-3
Original file line numberDiff line numberDiff line change
@@ -480,14 +480,20 @@ export const definitions: DefinitionWithExtend[] = [
480480
model: "552-72201",
481481
vendor: "Niko",
482482
description: "Connectable dimmer",
483-
fromZigbee: [fz.on_off, fz.brightness, fz.level_config, fz.command_move, fz.command_stop],
484-
toZigbee: [tz.light_onoff_brightness, tz.level_config],
485-
exposes: [e.light_brightness().withLevelConfig()],
483+
fromZigbee: [fz.on_off, fz.brightness, fz.level_config, fz.command_move, fz.command_stop, local.fz.switch_status_led],
484+
toZigbee: [tz.light_onoff_brightness, tz.level_config, local.tz.switch_led_enable, local.tz.switch_led_state],
485+
extend: [local.modernExtend.addCustomClusterManuSpecificNikoConfig(), local.modernExtend.addCustomClusterManuSpecificNikoState()],
486+
exposes: [
487+
e.light_brightness().withLevelConfig(),
488+
e.binary("led_enable", ea.ALL, true, false).withDescription("Enable LED"),
489+
e.enum("led_state", ea.ALL, ["ON", "OFF", "Blue", "Red", "Purple"]).withDescription("LED State"),
490+
],
486491
configure: async (device, coordinatorEndpoint) => {
487492
const endpoint = device.getEndpoint(1);
488493
await reporting.bind(endpoint, coordinatorEndpoint, ["genOnOff", "genLevelCtrl"]);
489494
await reporting.onOff(endpoint);
490495
await reporting.brightness(endpoint);
496+
await endpoint.read("manuSpecificNikoConfig", ["outletLedState", "outletLedColor"]);
491497
},
492498
},
493499
{

0 commit comments

Comments
 (0)