fix: follow Home Assistant Area marker moves

Issue: #126
User-Visible: yes
This commit is contained in:
Matysh
2026-08-31 09:45:53 +03:00
parent c8ef4f19e4
commit 633cb20e59
45 changed files with 1622 additions and 589 deletions
+15
View File
@@ -85,6 +85,21 @@ export const CONFIG_FIELD_REGISTRY = Object.freeze([
migration: 'drop on the next settings save',
compatibility: 'backend accepts bounded values so old configs still load',
},
{
id: 'settings.marker_area_snapshot',
enforcedBy: 'device-area-relocation.ts + validation.py; #126',
selector: { path: ['settings', 'marker_area_snapshot'] },
storage: 'House Plan server config',
type: 'Record<markerId, { binding: device:* | entity:*, area: areaId }>',
default: 'unset (= one-time safe backfill)',
level: 'global internal lifecycle metadata',
ui: 'hidden',
runtime: 'detect authoritative HA Area changes and supersede stale saved positions',
introduced: '#126 / v1.70.0',
status: 'current',
migration: 'safe point-in-room backfill; cross-source full import drops it',
compatibility: 'older frontends ignore it; same-source backup preserves it',
},
{
id: 'markers[].display=ripple',
enforcedBy: 'logic.ts normalizeDeviceDisplay (read) + editor-runtime _dropLegacySegments rewrites on every write',
+16
View File
@@ -380,6 +380,22 @@
"maxLength": 500,
"type": "str"
},
"config.settings.marker_area_snapshot": {
"required": false
},
"config.settings.marker_area_snapshot.<All(<class 'str'>, Length(min=1, max=500), msg=None)>.area": {
"maxLength": 500,
"minLength": 1,
"required": true,
"type": "str"
},
"config.settings.marker_area_snapshot.<All(<class 'str'>, Length(min=1, max=500), msg=None)>.binding": {
"maxLength": 500,
"minLength": 1,
"opaque": "Match('^(?:device|entity):.+$', msg=None)",
"required": true,
"type": "str"
},
"config.settings.new_device_ids": {
"required": false
},