Skip to content

Commit 89087c7

Browse files
Tiwasclaude
andcommitted
fix(clg-collection): propagate onoff to member CLG devices
onFlowTurnOnAllMembers/OffAllMembers on a Collection used to call the same method on each member CLG, which only toggles the underlying lamps and leaves the member's own onoff capability untouched. Toggling the Collection tile (which fires onFlowTurnOnAllMembers via the inherited onoff listener) therefore left the member tiles in their previous state. Call onFlowTurnOn/Off on each member instead so the member's capability flips and its lamps follow. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent ef8709f commit 89087c7

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

no.tiwas.booleantoolbox/.homeychangelog.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,5 +85,8 @@
8585
},
8686
"1.10.12": {
8787
"en": "Fix: Circadian Light Group Collection now resolves existing UUID-based members via Homey API, so toggling the Collection actually turns each member group on/off."
88+
},
89+
"1.10.13": {
90+
"en": "Fix: Toggling a Circadian Light Group Collection now flips each member group's own on/off state (not only the underlying lamps), so the member tiles update as expected."
8891
}
8992
}

no.tiwas.booleantoolbox/drivers/circadian-light-group-collection/device.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,16 +163,18 @@ class CircadianLightGroupCollectionDevice extends CircadianLightGroupDevice {
163163
}
164164

165165
async onFlowTurnOnAllMembers() {
166+
// For a Collection, "all members" = the member CLG devices themselves.
167+
// Use onFlowTurnOn so each member's onoff capability flips and its lights follow.
166168
await this.runForMemberGroups('turn_on_all_members', async (device) => {
167-
await device.onFlowTurnOnAllMembers();
168-
});
169+
await device.onFlowTurnOn();
170+
}, async (device) => device.getCapabilityValue('onoff') === true);
169171
return true;
170172
}
171173

172174
async onFlowTurnOffAllMembers() {
173175
await this.runForMemberGroups('turn_off_all_members', async (device) => {
174-
await device.onFlowTurnOffAllMembers();
175-
});
176+
await device.onFlowTurnOff();
177+
}, async (device) => device.getCapabilityValue('onoff') === false);
176178
return true;
177179
}
178180

0 commit comments

Comments
 (0)