fix: keep Symcon binding paths compact and allow direct unlinking

This commit is contained in:
jhartworks committed 2026-11-10 10:00:01 +01:00
1 parent 00fca890de
commit b9a095bc6e
12 files changed
+131 -46

No files matched your search

@@ -140,7 +140,7 @@ export function renderRoomClimate(host: EditorHost, room: Room, patch: (patch: P
// several sensors are averaged: once one is chosen, another can be added; "none" in a slot drops it
const save = (list: (string | null)[]) => {
const ids = list.filter((id): id is string => !!id && id !== "none");
change(key, list[0] === "none" ? "none" : ids.length > 1 ? ids : (ids[0] ?? null));
change(key, ids.length > 1 ? ids : (ids[0] ?? (list.includes("none") ? "none" : null)));
};
const real = picked[0] && picked[0] !== "none";
const slots = real ? [...picked, null] : picked;