fix: show entityless active controllers

Issue: #318
User-Visible: yes
This commit is contained in:
Matysh
2026-08-28 13:07:58 +00:00
committed by claude[bot]
parent 4b81dc2ad9
commit 72913fee84
41 changed files with 460 additions and 167 deletions
+15 -2
View File
@@ -2316,11 +2316,24 @@ const MUTANT_DEFINITIONS = [
+ 'controllers; excluding those siblings restores the field defect (#251)',
patches: [{
file: 'src/device-presentation.ts',
find: ' const live = (d.entities || []).some((eid) => {',
replace: " const live = (d.entities || []).filter((eid) => !eid.startsWith('sensor.') "
find: ' const live = ownEntities.some((eid) => {',
replace: " const live = ownEntities.filter((eid) => !eid.startsWith('sensor.') "
+ "&& !eid.startsWith('update.')).some((eid) => {",
}],
},
{
id: 'entityless-active-controller-stays-available',
guard: 'npx tsc -p tsconfig.test.json && node scripts/fix-test-build.mjs '
+ '&& node --test --test-name-pattern="issue 318 keeps an active entityless physical controller available" '
+ 'test/device-presentation.test.mjs',
because: 'an active physical controller whose HA device exposes no own entities has no offline '
+ 'evidence; its face must remain available while controls decide working versus neutral (#318)',
patches: [{
file: 'src/device-presentation.ts',
find: " if (activeEntitylessDevice) return 'available';",
replace: " if (activeEntitylessDevice) return 'unavailable';",
}],
},
{
id: 'wireless-controller-loses-filtered-target-role',
guard: 'npx tsc -p tsconfig.test.json && node scripts/fix-test-build.mjs '