feat: add native Symcon archive trends and explicit room naming

This commit is contained in:
jhartworks committed 2026-11-11 12:00:51 +01:00
1 parent bb153490b0
commit cfc77787a0
28 files changed
+2449 -1250

No files matched your search

+3 -2
View File
@@ -100,6 +100,7 @@ import { EditHistory } from "./editor/history.ts";
import { copyOfFurniture, copyOfOutdoorArea, deviceForFurniture, furnitureForDevice, newFloorOpening, newFreeWall, newFurniture, newOutdoorArea, offsetOnEdge, openingKindPatch, parkingSpotFor, placeInRoom, removeDevice, roomCentre, turnedBy } from "./editor/ops/items.ts";
import { NO_CHANGE, NOTHING_TO_MOVE, nudge, type NudgeTarget } from "./editor/ops/nudge.ts";
import { areaChoice, copyOfRoom, cornerMoved, evenCeilingLights, newRoom, rectangleAfter, removeCorner, removeRoom, type RectField } from "./editor/ops/rooms.ts";
import { isSymcon } from "../entities/symcon-values.ts";
import { translate as moveScope, turnQuarterClockwise, type Scope } from "./editor/ops/transform.ts";
import { Selection, type ItemKind } from "./editor/selection.ts";
import { SideState } from "./editor/side-state.ts";
@@ -545,7 +546,7 @@ export class NfEditor extends LitElement {
case "set_area":
return this.change((doc) => {
const room = onFloor(doc)?.rooms.find((r) => r.id === fix.roomId);
if (room) Object.assign(room, areaChoice(room, fix.areaId, this.hass?.areas ?? {}));
if (room) Object.assign(room, areaChoice(room, fix.areaId, this.hass?.areas ?? {}, !isSymcon(this.hass)));
});
case "add_area_rooms": {
const floor = onFloor(this._doc);
@@ -2636,7 +2637,7 @@ export class NfEditor extends LitElement {
private setArea(areaId: string): void {
const room = this.room;
if (room) this.updateRoom(areaChoice(room, areaId, this.hass?.areas ?? {}));
if (room) this.updateRoom(areaChoice(room, areaId, this.hass?.areas ?? {}, !isSymcon(this.hass)));
}
private setRect(field: RectField, value: number): void {