feat: add room name switches to 3D view and editor toolbars

This commit is contained in:
jhartworks committed 2026-11-10 10:41:07 +01:00
1 parent 7a9b2c0a38
commit 3f6cca056c
13 files changed
+695 -585

No files matched your search

+7 -1
View File
@@ -50,6 +50,7 @@ export class NextFloorCard extends LitElement {
_clean: { state: true },
_night: { state: true },
_orbit: { state: true },
_roomNames: { state: true },
};
declare hass: HomeAssistant;
@@ -72,6 +73,7 @@ export class NextFloorCard extends LitElement {
/** Kiosk: the night dimming is on, and the screensaver turn runs (after an idle return). */
private declare _night: boolean;
private declare _orbit: boolean;
private declare _roomNames: boolean | null;
private readonly data = new BuildingController(this);
private readonly kiosk = new KioskTimers({
@@ -96,6 +98,7 @@ export class NextFloorCard extends LitElement {
this._clean = false;
this._night = false;
this._orbit = false;
this._roomNames = null;
}
private view3d() {
@@ -147,6 +150,7 @@ export class NextFloorCard extends LitElement {
setConfig(config: CardConfig): void {
if (config.height !== undefined && !(config.height > 100)) throw new Error("height must be a number of pixels above 100");
this._roomNames = null;
this._own = config;
this._config = withTemplate(config, this.data.building?.settings.card_templates as CardTemplates | undefined);
this._floorId = undefined;
@@ -353,7 +357,9 @@ export class NextFloorCard extends LitElement {
.flows=${c?.flows ?? null}
.holograms=${c?.holograms ?? null}
.floorThumbs=${this.thumbs}
.roomLabels=${c?.room_names !== false}
.roomLabels=${this._roomNames ?? (c?.room_names !== false)}
.roomNamesButton=${true}
@room-names-change=${(e: CustomEvent<{ value: boolean }>) => (this._roomNames = e.detail.value)}
.floorStack=${c?.floor_stack ?? "dim"}
.panelOpen=${!!this._roomId && c?.room_panel !== false}
.alerts=${c?.alerts !== false}