fix: follow marker placement for room climate

Issue: #317
User-Visible: yes
This commit is contained in:
Matysh
2026-08-28 16:48:10 +03:00
parent b3df25ab85
commit 6c9752f5e6
32 changed files with 708 additions and 337 deletions
+13
View File
@@ -105,6 +105,19 @@ function relocateEditorPatch(patch, cardSource, editorSource) {
// `find` обязан встречаться в файле ровно один раз: патч, который ложится «куда
// попало», проверяет не то, что объявлен проверять. Это контролирует --check.
const MUTANT_DEFINITIONS = [
{
id: 'room-climate-ignores-marker-placement',
guard: 'node demo/smoke_room_climate_placement.mjs',
because: 'a real sensor manually placed into a House Plan room must leave its registry HA '
+ 'Area and feed the local room label, tooltip and temperature fill exactly once (#317)',
patches: [{
file: 'src/devices.ts',
find: ' const target = entityTargets.get(eid)\n'
+ ' || (reg.device_id ? deviceTargets.get(reg.device_id) : null)\n'
+ ' || reg.area_id || dev?.area_id || null;',
replace: ' const target = reg.area_id || dev?.area_id || null;',
}],
},
{
id: 'editor-runtime-fingerprint-handshake',
guard: 'npx tsc -p tsconfig.test.json && node scripts/fix-test-build.mjs '
+7
View File
@@ -27,6 +27,13 @@
/** @type {SmokeLink[]} */
export const SMOKE_LINKS = [
{
symbols: ['roomClimateKey', 'roomClimateMap'],
smokes: ['smoke_room_climate_placement.mjs'],
because: 'the #317 production-bundle scenario proves one manually placed sensor through '
+ 'room label, tooltip, temperature fill and hosted Static; those DOM surfaces cannot call '
+ 'the pure room-target helpers directly',
},
{
symbols: [
'LanguageRuntime', 'LanguageRuntimeContract', 'languageRenderGate',