mirror of
https://github.com/Matysh/houseplan-card
synced 2026-10-05 06:08:59 +00:00
fix(config): an ordinary save without led_strips keeps the stored shapes (#780)
r1 H1: a previous frontend sends every space without the unknown field and the ordinary write path replaced the document with it, erasing every LED strip. The shared ordinary-writer helper now copies the stored shapes of a space the payload omits (config/set and Optimize); an explicit list from a new client still deletes, a removed space takes its strips, and a link to a marker the same write deleted unbinds by the usual rule. config/set reports the normalisation counters after the preservation. Issue: #780 User-Visible: no
This commit is contained in:
@@ -14374,6 +14374,16 @@ const MUTANT_DEFINITIONS = [
|
||||
replace: ' unbound_led_strips = unbind_strips(space, remap={\n old_id: old_id for old_id, new_id in marker_map.items()',
|
||||
}],
|
||||
},
|
||||
{
|
||||
id: 'led-old-writer-drops-strips',
|
||||
guard: 'node scripts/backend-test-guard.mjs old_writer tests_backend/test_led_strips.py',
|
||||
because: '#780 r1 H1: an ordinary save without the unknown field keeps the stored shapes; only an explicit list deletes',
|
||||
patches: [{
|
||||
file: 'custom_components/houseplan/validation.py',
|
||||
find: ' preserve_summary_panel_namespace(candidate, previous)\n preserve_led_strips(candidate, previous)',
|
||||
replace: ' preserve_summary_panel_namespace(candidate, previous)',
|
||||
}],
|
||||
},
|
||||
];
|
||||
|
||||
const mutationCardSource = readFileSync(join(repoRoot, 'src/houseplan-card.ts'), 'utf8');
|
||||
|
||||
Reference in New Issue
Block a user