⚡ ${this.t("room_energy", { today: kwh(e.today), month: kwh(e.month) })}${cost ? ` · ${formatNumber(this.hass, cost.value, 2)} ${cost.currency}` : ""}
`; } /** The heating curve: the room's temperature over the last 24 hours, with its lowest and highest value. */ private renderCurve() { const curve = this._curve; if (!curve) return nothing; const values = curve.filter((v): v is number => v !== null); const lo = Math.min(...values); const hi = Math.max(...values); const span = Math.max(1, hi - lo); const shifted = curve.map((v) => (v === null ? null : v - lo + span * 0.1)); const d = curvePath(shifted, 220, 36, span * 1.2); const f = (v: number) => `${formatNumber(this.hass, fromCelsius(this.hass, v), 1)}°`; return html`${facts.map((fact, i) => html`${i ? " · " : nothing}${fact}`)}
` : nothing} ${this.renderEnergy()} ${this.renderSunYear()} ${this.renderShade()} ${this.renderOpenWhileHeating(climates)} ${this.renderEmptyLights(room, lightsOn)} ${this.renderCurve()}${this.t("panel_no_area")}
` : !ids.length && !(isSymcon(this.hass) && hvacRefs.length) ? html`${this.t("panel_empty")}
` : nothing} ${scenes.length ? this.section( "panel_scenes", [ html`${this._said.text}
` : nothing}`, ]); } /** Blocks plugins add for this room, titled with the plugin's name. */ private pluginSections(room: { id: string; name: string; area_id?: string | null }, ids: string[]) { const sections = pluginRoomSections({ hass: this.hass, room: { id: room.id, name: room.name, area_id: room.area_id ?? null }, entities: ids }); return sections.map( (sec) => html`${sec.content}
` : sec.content}${title}
` : nothing} ${typeof a.volume_level === "number" ? html`` : nothing}