Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(lumi): pet feeder LED indicator control #8041

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 19 additions & 3 deletions src/devices/lumi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3849,11 +3849,27 @@ 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')
.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) => {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/lumi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Loading