From 2212aa310d969962adf11e20699b3c3686495b36 Mon Sep 17 00:00:00 2001 From: Ivan Pankratov Date: Sat, 28 Sep 2024 16:07:18 +0500 Subject: [PATCH 1/3] fix(lumi): pet feeder LED indicator control After updating to firmware version 9761, LED control doesn't work at all. Zigbee2mqtt reports "OFF" state, while indicator is turned on. Controlling the LED state either via zigbee2mqtt or via Home Assistant doesn't result in any change. I can only assume that previous firmware version (9505) got incorrect status mapping, while latest (9761) fixed this. --- src/lib/lumi.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/lumi.ts b/src/lib/lumi.ts index 91d25d14de517..2a7aeff9f3bbf 100644 --- a/src/lib/lumi.ts +++ b/src/lib/lumi.ts @@ -3760,7 +3760,7 @@ export const toZigbee = { break; } case 'led_indicator': - await sendAttr(0x04170055, getFromLookup(value, {ON: 0, OFF: 1}), 1); + await sendAttr(0x04170055, getFromLookup(value, {ON: 1, OFF: 0}), 1); break; case 'child_lock': await sendAttr(0x04160055, getFromLookup(value, {UNLOCK: 0, LOCK: 1}), 1); From 8cb798e93b1b4fb4c03813fbcdadbc3455b38542 Mon Sep 17 00:00:00 2001 From: Ivan Pankratov Date: Sat, 28 Sep 2024 21:57:47 +0500 Subject: [PATCH 2/3] feat(lumi): pet feeder LED indicator mode description Based on settings from Aqara app. --- src/devices/lumi.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/devices/lumi.ts b/src/devices/lumi.ts index cc9bbcbc9de12..0dd06bb6301e6 100644 --- a/src/devices/lumi.ts +++ b/src/devices/lumi.ts @@ -3849,7 +3849,10 @@ const definitions: DefinitionWithExtend[] = [ .withFeature(e.numeric('size', exposes.access.STATE_SET)), ) .withDescription('Feeding schedule'), - e.binary('led_indicator', ea.STATE_SET, 'ON', 'OFF').withDescription('Led indicator'), + e + .binary('led_indicator', ea.STATE_SET, 'ON', 'OFF') + .withLabel('Disable LED at night') + .withDescription('LED indicator will be disabled every day from 21:00 to 09:00'), e.child_lock(), e.enum('mode', ea.STATE_SET, ['schedule', 'manual']).withDescription('Feeding mode'), e.numeric('serving_size', ea.STATE_SET).withValueMin(1).withValueMax(10).withDescription('One serving size').withUnit('portion'), From e4f42b21ae1c20f30e556794dc708857d81d4ecd Mon Sep 17 00:00:00 2001 From: Ivan Pankratov Date: Sat, 28 Sep 2024 22:00:51 +0500 Subject: [PATCH 3/3] fix(lumi): move some "pet feeder" props under "config" category --- src/devices/lumi.ts | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/devices/lumi.ts b/src/devices/lumi.ts index 0dd06bb6301e6..85c9eb204b8c3 100644 --- a/src/devices/lumi.ts +++ b/src/devices/lumi.ts @@ -3852,11 +3852,24 @@ const definitions: DefinitionWithExtend[] = [ e .binary('led_indicator', ea.STATE_SET, 'ON', 'OFF') .withLabel('Disable LED at night') - .withDescription('LED indicator will be disabled every day from 21:00 to 09:00'), + .withDescription('LED indicator will be disabled every day from 21:00 to 09:00') + .withCategory('config'), e.child_lock(), e.enum('mode', ea.STATE_SET, ['schedule', 'manual']).withDescription('Feeding mode'), - e.numeric('serving_size', ea.STATE_SET).withValueMin(1).withValueMax(10).withDescription('One serving size').withUnit('portion'), - e.numeric('portion_weight', ea.STATE_SET).withValueMin(1).withValueMax(20).withDescription('Portion weight').withUnit('g'), + e + .numeric('serving_size', ea.STATE_SET) + .withValueMin(1) + .withValueMax(10) + .withDescription('One serving size') + .withUnit('portion') + .withCategory('config'), + e + .numeric('portion_weight', ea.STATE_SET) + .withValueMin(1) + .withValueMax(20) + .withDescription('Portion weight') + .withUnit('g') + .withCategory('config'), ], extend: [lumiZigbeeOTA()], configure: async (device, coordinatorEndpoint) => {