113 files

This commit is contained in:
Home Assistant Version Control
2026-08-26 07:17:31 +00:00
parent 0533eaca8d
commit 15c0e35c18
113 changed files with 12448 additions and 1673 deletions
+141 -130
View File
@@ -262,8 +262,8 @@ U.elementStyles = [], U.shadowRootOptions = { mode: "open" }, U[J("elementProper
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
const Z = globalThis, re = Z.trustedTypes, Ce = re ? re.createPolicy("lit-html", { createHTML: (t) => t }) : void 0, je = "$lit$", V = `lit$${Math.random().toFixed(9).slice(2)}$`, qe = "?" + V, _t = `<${qe}>`, I = document, Q = () => I.createComment(""), K = (t) => t === null || typeof t != "object" && typeof t != "function", be = Array.isArray, mt = (t) => be(t) || typeof t?.[Symbol.iterator] == "function", de = `[
\f\r]`, W = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Se = /-->/g, ze = />/g, P = RegExp(`>|${de}(?:([^\\s"'>=/]+)(${de}*=${de}*(?:[^
const Z = globalThis, re = Z.trustedTypes, Ce = re ? re.createPolicy("lit-html", { createHTML: (t) => t }) : void 0, je = "$lit$", V = `lit$${Math.random().toFixed(9).slice(2)}$`, qe = "?" + V, _t = `<${qe}>`, I = document, Q = () => I.createComment(""), K = (t) => t === null || typeof t != "object" && typeof t != "function", be = Array.isArray, mt = (t) => be(t) || typeof t?.[Symbol.iterator] == "function", ue = `[
\f\r]`, W = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Se = /-->/g, ze = />/g, P = RegExp(`>|${ue}(?:([^\\s"'>=/]+)(${ue}*=${ue}*(?:[^
\f\r"'\`<>=]|("|')|))|$)`, "g"), Me = /'/g, Ve = /"/g, We = /^(?:script|style|textarea|title)$/i, Ge = (t) => (e, ...i) => ({ _$litType$: t, strings: e, values: i }), x = Ge(1), D = Ge(2), j = Symbol.for("lit-noChange"), _ = Symbol.for("lit-nothing"), Ee = /* @__PURE__ */ new WeakMap(), O = I.createTreeWalker(I, 129);
function Ye(t, e) {
if (!be(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
@@ -295,7 +295,7 @@ class ee {
if (s.nodeType === 1) {
if (s.hasAttributes()) for (const u of s.getAttributeNames()) if (u.endsWith(je)) {
const f = c[r++], d = s.getAttribute(u).split(V), p = /([.?@])?(.*)/.exec(f);
l.push({ type: 1, index: o, name: p[2], strings: d, ctor: p[1] === "." ? yt : p[1] === "?" ? $t : p[1] === "@" ? xt : le }), s.removeAttribute(u);
l.push({ type: 1, index: o, name: p[2], strings: d, ctor: p[1] === "." ? yt : p[1] === "?" ? $t : p[1] === "@" ? xt : ae }), s.removeAttribute(u);
} else u.startsWith(V) && (l.push({ type: 6, index: o }), s.removeAttribute(u));
if (We.test(s.tagName)) {
const u = s.textContent.split(V), f = u.length - 1;
@@ -411,7 +411,7 @@ class te {
this._$AM === void 0 && (this._$Cv = e, this._$AP?.(e));
}
}
class le {
class ae {
get tagName() {
return this.element.tagName;
}
@@ -436,7 +436,7 @@ class le {
e === _ ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
}
}
class yt extends le {
class yt extends ae {
constructor() {
super(...arguments), this.type = 3;
}
@@ -444,7 +444,7 @@ class yt extends le {
this.element[this.name] = e === _ ? void 0 : e;
}
}
class $t extends le {
class $t extends ae {
constructor() {
super(...arguments), this.type = 4;
}
@@ -452,7 +452,7 @@ class $t extends le {
this.element.toggleAttribute(this.name, !!e && e !== _);
}
}
class xt extends le {
class xt extends ae {
constructor(e, i, n, s, o) {
super(e, i, n, s, o), this.type = 5;
}
@@ -556,7 +556,7 @@ const St = { attribute: !0, type: String, converter: se, reflect: !1, hasChanged
}
throw Error("Unsupported decorator location: " + n);
};
function ce(t) {
function le(t) {
return (e, i) => typeof i == "object" ? zt(t, e, i) : ((n, s, o) => {
const r = s.hasOwnProperty(o);
return s.constructor.createProperty(o, n), r ? Object.getOwnPropertyDescriptor(s, o) : void 0;
@@ -568,7 +568,7 @@ function ce(t) {
* SPDX-License-Identifier: BSD-3-Clause
*/
function ve(t) {
return ce({ ...t, state: !0, attribute: !1 });
return le({ ...t, state: !0, attribute: !1 });
}
var Te, Pe;
(function(t) {
@@ -576,7 +576,7 @@ var Te, Pe;
})(Te || (Te = {})), (function(t) {
t.language = "language", t.system = "system", t.am_pm = "12", t.twenty_four = "24";
})(Pe || (Pe = {}));
var pe = function(t, e, i, n) {
var fe = function(t, e, i, n) {
n = n || {}, i = i ?? {};
var s = new Event(e, { bubbles: n.bubbles === void 0 || n.bubbles, cancelable: !!n.cancelable, composed: n.composed === void 0 || n.composed });
return s.detail = i, t.dispatchEvent(s), s;
@@ -589,7 +589,7 @@ var pe = function(t, e, i, n) {
clearTimeout(n), n = setTimeout(r, e), a && t.apply(o, s);
};
}, Vt = function(t, e, i) {
i === void 0 && (i = !1), i ? history.replaceState(null, "", e) : history.pushState(null, "", e), pe(window, "location-changed", { replace: i });
i === void 0 && (i = !1), i ? history.replaceState(null, "", e) : history.pushState(null, "", e), fe(window, "location-changed", { replace: i });
};
function Ze(t) {
return typeof t == "object" && t !== null && "entity" in t && typeof t.entity == "string";
@@ -801,7 +801,7 @@ function ti({ attributes: t, state: e }) {
hvacMode: o ?? null
};
}
function fe(t, e) {
function de(t, e) {
return e === "temp_difference" ? t.tempDifference : e === "temp_offset" ? t.tempOffset : e === "current_temperature" ? t.currentTemperature : e === "temperature" ? t.targetTemperature : e === "hvac_action" ? t.hvacAction : e === "hvac_mode" ? t.hvacMode : null;
}
function ii(t, e = {}, i = 0) {
@@ -1433,12 +1433,12 @@ const Ei = Fe`
display: none;
}
`;
var Ti = Object.defineProperty, Pi = Object.getOwnPropertyDescriptor, he = (t, e, i, n) => {
var Ti = Object.defineProperty, Pi = Object.getOwnPropertyDescriptor, ce = (t, e, i, n) => {
for (var s = n > 1 ? void 0 : n ? Pi(e, i) : e, o = t.length - 1, r; o >= 0; o--)
(r = t[o]) && (s = (n ? r(e, i, s) : r(s)) || s);
return n && s && Ti(e, i, s), s;
};
const Ni = "0.15.2";
const Ni = "0.15.3";
console.info(
`%c TREEMAP-CARD %c v${Ni}`,
"color: white; background: #3498db; font-weight: bold;",
@@ -1452,7 +1452,7 @@ let T = class extends B {
* Return the editor element for visual configuration
*/
static getConfigElement() {
return Promise.resolve().then(() => rn), document.createElement("treemap-card-editor");
return Promise.resolve().then(() => cn), document.createElement("treemap-card-editor");
}
/**
* Return stub config for card picker (finds temperature sensors for preview)
@@ -1626,7 +1626,7 @@ let T = class extends B {
}
if (ei(h)) {
const g = ti(c), b = this._config?.value?.attribute || "current_temperature", w = this._config?.size?.attribute || b, A = this._config?.color?.attribute || b;
let k = fe(g, b), C = fe(g, w), y = fe(g, A);
let k = de(g, b), C = de(g, w), y = de(g, A);
k === null && (k = F(c.attributes[b]) ?? 0), C === null && (C = F(c.attributes[w]) ?? 0), y === null && (y = F(c.attributes[A]) ?? 0);
const z = typeof k == "number" ? k : 0, M = typeof C == "number" ? Math.max(0.1, Math.abs(C)) : 0.1, st = typeof y == "number" ? y : 0;
let R;
@@ -1920,16 +1920,16 @@ let T = class extends B {
title="${t.label}: ${t.value}"
>
${l && (t.icon || this._config?.icon?.icon) ? x`<ha-icon
class="treemap-icon ${a ? "hvac-active" : ""}"
style="${p}"
icon="${t.icon || this._config?.icon?.icon}"
></ha-icon>` : _}
class="treemap-icon ${a ? "hvac-active" : ""}"
style="${p}"
icon="${t.icon || this._config?.icon?.icon}"
></ha-icon>` : _}
${h ? x`<span class="treemap-label" style="${$}">${u}</span>` : _}
${c ? x`<span class="treemap-value" style="${v}">${f}</span>` : _}
${this._config?.sparkline?.show !== !1 ? (() => {
const g = t.sparklineData ?? (t.entity_id ? this._sparklineData.get(t.entity_id) : void 0);
return x`<div class="treemap-sparkline">
${li(g, {
${li(g, {
mode: this._config?.sparkline?.mode || "dark",
line: this._config?.sparkline?.line,
fill: this._config?.sparkline?.fill,
@@ -1938,7 +1938,7 @@ let T = class extends B {
min: this._config?.sparkline?.min,
max: this._config?.sparkline?.max
})}
</div>`;
</div>`;
})() : _}
</div>
`;
@@ -1960,7 +1960,7 @@ let T = class extends B {
_executeAction(t, e) {
switch (t.action) {
case "more-info":
e && pe(this, "hass-more-info", { entityId: e });
e && fe(this, "hass-more-info", { entityId: e });
break;
case "navigate":
"navigation_path" in t && t.navigation_path && Vt(this, t.navigation_path);
@@ -1981,7 +1981,7 @@ let T = class extends B {
}
break;
case "assist":
pe(this, "hass-launch-voice-assistant", {});
fe(this, "hass-launch-voice-assistant", {});
break;
}
}
@@ -2004,16 +2004,16 @@ let T = class extends B {
};
T.styles = Ei;
T._HOLD_THRESHOLD_MS = 500;
he([
ce({ attribute: !1 })
ce([
le({ attribute: !1 })
], T.prototype, "hass", 2);
he([
ce([
ve()
], T.prototype, "_config", 2);
he([
ce([
ve()
], T.prototype, "_sparklineData", 2);
T = he([
T = ce([
Je("treemap-card")
], T);
window.customCards = window.customCards || [];
@@ -2023,56 +2023,74 @@ window.customCards.push({
description: "Visualize entities as a treemap with size and color based on values",
preview: !0
});
function ae(t) {
function Di(t, e) {
return t === e || Number.isNaN(t) && Number.isNaN(e);
}
function Oi(t) {
return t == null ? "" : Ke(t);
}
function Ke(t) {
if (typeof t == "string") return t;
if (Array.isArray(t)) return t.map(Ke).join(",");
const e = String(t);
return e === "0" && Object.is(Number(t), -0) ? "-0" : e;
}
function $e(t) {
return typeof t == "string" || typeof t == "symbol" ? t : Object.is(t?.valueOf?.(), -0) ? "-0" : String(t);
}
function et(t) {
if (Array.isArray(t)) return t.map($e);
if (typeof t == "symbol") return [t];
t = Oi(t);
const e = [], i = t.length;
if (i === 0) return e;
let n = 0, s = "", o = "", r = !1, a = !1;
const l = /^-?\d+(?:\.\d+)?$/;
for (t.charCodeAt(0) === 46 && e.push(""); n < i; ) {
const h = t[n];
if (o) h === "\\" && n + 1 < i ? (n++, s += t[n]) : h === o ? o = "" : s += h;
else if (r) if (h === '"' || h === "'")
o = h, a = !0;
else if (h === "]") {
if (r = !1, !a && s.includes(".") && !l.test(s)) {
const c = s.split(".");
for (let u = 0; u < c.length; u++) c[u] !== "" && e.push(c[u]);
} else e.push(s);
s = "";
} else s += h;
else if (h === "[")
r = !0, a = !1, s && (e.push(s), s = "");
else if (h === ".") {
s && (e.push(s), s = "");
const c = t[n + 1];
(c === void 0 || c === ".") && e.push("");
} else s += h;
n++;
}
return s && e.push(s), e;
}
function pe(t) {
return t === "__proto__";
}
function Di(t) {
const Ii = /\.|(\[(?:[^[\]]*|(["'])(?:(?!\2)[^\\]|\\.)*?\2)\])/;
function Hi(t) {
switch (typeof t) {
case "number":
case "symbol":
return !1;
case "string":
return t.includes(".") || t.includes("[") || t.includes("]");
return t === "" || t.startsWith(".") || t.endsWith(".") ? !1 : Ii.test(t);
default:
return !1;
}
}
function $e(t) {
return typeof t == "string" || typeof t == "symbol" ? t : Object.is(t?.valueOf?.(), -0) ? "-0" : String(t);
}
function Ke(t) {
if (t == null)
return "";
if (typeof t == "string")
return t;
if (Array.isArray(t))
return t.map(Ke).join(",");
const e = String(t);
return e === "0" && Object.is(Number(t), -0) ? "-0" : e;
}
function et(t) {
if (Array.isArray(t))
return t.map($e);
if (typeof t == "symbol")
return [t];
t = Ke(t);
const e = [], i = t.length;
if (i === 0)
return e;
let n = 0, s = "", o = "", r = !1;
for (t.charCodeAt(0) === 46 && (e.push(""), n++); n < i; ) {
const a = t[n];
o ? a === "\\" && n + 1 < i ? (n++, s += t[n]) : a === o ? o = "" : s += a : r ? a === '"' || a === "'" ? o = a : a === "]" ? (r = !1, e.push(s), s = "") : s += a : a === "[" ? (r = !0, s && (e.push(s), s = "")) : a === "." ? s && (e.push(s), s = "") : s += a, n++;
}
return s && e.push(s), e;
}
function tt(t, e, i) {
if (t == null)
return i;
if (t == null) return i;
switch (typeof e) {
case "string": {
if (ae(e))
return i;
if (pe(e)) return i;
const n = t[e];
return n === void 0 ? Di(e) ? tt(t, et(e), i) : i : n;
return n === void 0 ? Hi(e) && !Object.hasOwn(t, e) ? tt(t, et(e), i) : i : n;
}
case "number":
case "symbol": {
@@ -2081,22 +2099,18 @@ function tt(t, e, i) {
return n === void 0 ? i : n;
}
default: {
if (Array.isArray(e))
return Oi(t, e, i);
if (Object.is(e?.valueOf(), -0) ? e = "-0" : e = String(e), ae(e))
return i;
if (Array.isArray(e)) return Ri(t, e, i);
if (Object.is(e?.valueOf(), -0) ? e = "-0" : e = String(e), pe(e)) return i;
const n = t[e];
return n === void 0 ? i : n;
}
}
}
function Oi(t, e, i) {
if (e.length === 0)
return i;
function Ri(t, e, i) {
if (e.length === 0) return i;
let n = t;
for (let s = 0; s < e.length; s++) {
if (n == null || ae(e[s]))
return i;
if (n == null || pe(e[s])) return i;
n = n[e[s]];
}
return n === void 0 ? i : n;
@@ -2104,58 +2118,55 @@ function Oi(t, e, i) {
function Re(t) {
return t !== null && (typeof t == "object" || typeof t == "function");
}
function Ii(t, e) {
return t === e || Number.isNaN(t) && Number.isNaN(e);
}
const Hi = /^(?:0|[1-9]\d*)$/;
function Ri(t, e = Number.MAX_SAFE_INTEGER) {
const Li = /^(?:0|[1-9]\d*)$/;
function Ui(t, e = Number.MAX_SAFE_INTEGER) {
switch (typeof t) {
case "number":
return Number.isInteger(t) && t >= 0 && t < e;
case "symbol":
return !1;
case "string":
return Hi.test(t);
return Li.test(t);
}
}
function Li(t) {
function Bi(t) {
return typeof t == "symbol" || t instanceof Symbol;
}
const Ui = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Bi = /^\w*$/;
function Fi(t, e) {
return Array.isArray(t) ? !1 : typeof t == "number" || typeof t == "boolean" || t == null || Li(t) ? !0 : typeof t == "string" && (Bi.test(t) || !Ui.test(t)) || e != null && Object.hasOwn(e, t);
const Fi = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, ji = /^\w*$/;
function qi(t, e) {
return Array.isArray(t) ? !1 : typeof t == "number" || typeof t == "boolean" || t == null || Bi(t) ? !0 : typeof t == "string" && (ji.test(t) || !Fi.test(t)) || e != null && Object.hasOwn(e, t);
}
const ji = (t, e, i) => {
const Wi = (t, e, i) => {
const n = t[e];
(!(Object.hasOwn(t, e) && Ii(n, i)) || i === void 0 && !(e in t)) && (t[e] = i);
(!(Object.hasOwn(t, e) && Di(n, i)) || i === void 0 && !(e in t)) && (t[e] = i);
};
function qi(t, e, i, n) {
if (t == null && !Re(t))
return t;
function Gi(t) {
return t === "__proto__" || t === "constructor" || t === "prototype";
}
function Yi(t, e, i, n) {
if (t == null && !Re(t)) return t;
let s;
Fi(e, t) ? s = [e] : Array.isArray(e) ? s = e : s = et(e);
qi(e, t) ? s = [e] : Array.isArray(e) ? s = e : s = et(e);
const o = i(tt(t, s));
let r = t;
for (let a = 0; a < s.length && r != null; a++) {
const l = $e(s[a]);
if (ae(l))
continue;
if (Gi(l)) return t;
let h;
if (a === s.length - 1)
h = o;
if (a === s.length - 1) h = o;
else {
const c = r[l], u = n?.(c, l, t);
h = u !== void 0 ? u : Re(c) ? c : Ri(s[a + 1]) ? [] : {};
h = u !== void 0 ? u : Re(c) ? c : Ui(s[a + 1]) ? [] : {};
}
ji(r, l, h), r = r[l];
Wi(r, l, h), r = r[l];
}
return t;
}
function N(t, e, i) {
return qi(t, e, () => i, () => {
return Yi(t, e, () => i, () => {
});
}
const Wi = Fe`
const Ji = Fe`
:host {
display: block;
}
@@ -2412,55 +2423,55 @@ const Wi = Fe`
climate.*
light.living_*` }, exclude: { label: "Ausschlussmuster", placeholder: `*_battery
*_unavailable
light.*` }, label: { title: "Bezeichnung", prefix: "Präfix", suffix: "Suffix", find: "Suchen", replace: "Ersetzen mit", find_placeholder: "Temperatur", replace_placeholder: "Temp" }, value: { title: "Wert", prefix: "Präfix", suffix: "Suffix", suffix_placeholder: "%", precision: "Dezimalstellen", abbreviate: "Große Zahlen abkürzen (k, M, B)" }, icon: { title: "Symbol", override: "Symbol ersetzen" }, sparkline: { title: "Sparkline", period: "Zeitraum", period_12h: "12 Stunden", period_24h: "24 Stunden", period_7d: "7 Tage", period_30d: "30 Tage", mode: "Modus", mode_dark: "Dunkel", mode_light: "Hell", show_line: "Linie anzeigen", show_fill: "Füllung anzeigen", show_hvac: "HVAC-Balken anzeigen (Klimaentitäten)", min: "Y-Achse Min", max: "Y-Achse Max" }, colors: { title: "Farben", target: "Farbe anwenden auf", target_background: "Hintergrund", target_foreground: "Vordergrund (Text)", gradient: "Farbverlauf (niedrig → mittel → hoch)", low: "Niedrig ≤", mid: "Mittel =", high: "Hoch ≥", auto: "auto", middle: "mitte", hvac_colors: "HVAC-Farben (Klimaentitäten)", heating: "Heizen", cooling: "Kühlen", off: "Aus", unavailable: "Nicht verfügbar" }, size: { title: "Größe", equal: "Gleich große Rechtecke", inverse: "Invertiert (niedrige Werte = größer)", min: "Min", max: "Max" }, layout: { title: "Layout", height: "Höhe (px)", gap: "Abstand (px)" }, footer: { docs: "Doku", issues: "Bug oder Idee?", star: "Gefällt es? Stern geben!" }, actions: { title: "Aktionen", tap_action: "Tipp-Aktion", hold_action: "Halten-Aktion" }, data: { title: "Daten", order: "Sortierung", desc: "Absteigend (hoch zuerst)", asc: "Aufsteigend (niedrig zuerst)", limit: "Limit", all: "alle", above: "Filter oberhalb", below: "Filter unterhalb", unavailable: "Nicht verfügbare Entitäten einschließen", sort_by: "Sortieren nach", sort_by_value: "Wert (optimales Layout)", sort_by_entity_id: "Entitäts-ID", sort_by_label: "Bezeichnung", sort_by_default: "Konfigurationsreihenfolge" } }, Gi = {
light.*` }, label: { title: "Bezeichnung", prefix: "Präfix", suffix: "Suffix", find: "Suchen", replace: "Ersetzen mit", find_placeholder: "Temperatur", replace_placeholder: "Temp" }, value: { title: "Wert", prefix: "Präfix", suffix: "Suffix", suffix_placeholder: "%", precision: "Dezimalstellen", abbreviate: "Große Zahlen abkürzen (k, M, B)" }, icon: { title: "Symbol", override: "Symbol ersetzen" }, sparkline: { title: "Sparkline", period: "Zeitraum", period_12h: "12 Stunden", period_24h: "24 Stunden", period_7d: "7 Tage", period_30d: "30 Tage", mode: "Modus", mode_dark: "Dunkel", mode_light: "Hell", show_line: "Linie anzeigen", show_fill: "Füllung anzeigen", show_hvac: "HVAC-Balken anzeigen (Klimaentitäten)", min: "Y-Achse Min", max: "Y-Achse Max" }, colors: { title: "Farben", target: "Farbe anwenden auf", target_background: "Hintergrund", target_foreground: "Vordergrund (Text)", gradient: "Farbverlauf (niedrig → mittel → hoch)", low: "Niedrig ≤", mid: "Mittel =", high: "Hoch ≥", auto: "auto", middle: "mitte", hvac_colors: "HVAC-Farben (Klimaentitäten)", heating: "Heizen", cooling: "Kühlen", off: "Aus", unavailable: "Nicht verfügbar" }, size: { title: "Größe", equal: "Gleich große Rechtecke", inverse: "Invertiert (niedrige Werte = größer)", min: "Min", max: "Max" }, layout: { title: "Layout", height: "Höhe (px)", gap: "Abstand (px)" }, footer: { docs: "Doku", issues: "Bug oder Idee?", star: "Gefällt es? Stern geben!" }, actions: { title: "Aktionen", tap_action: "Tipp-Aktion", hold_action: "Halten-Aktion" }, data: { title: "Daten", order: "Sortierung", desc: "Absteigend (hoch zuerst)", asc: "Aufsteigend (niedrig zuerst)", limit: "Limit", all: "alle", above: "Filter oberhalb", below: "Filter unterhalb", unavailable: "Nicht verfügbare Entitäten einschließen", sort_by: "Sortieren nach", sort_by_value: "Wert (optimales Layout)", sort_by_entity_id: "Entitäts-ID", sort_by_label: "Bezeichnung", sort_by_default: "Konfigurationsreihenfolge" } }, Zi = {
editor: it
}, Yi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
}, Xi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
default: Gi,
default: Zi,
editor: it
}, Symbol.toStringTag, { value: "Module" })), nt = { no_config: "No configuration", yaml_only: "JSON attribute mode is configured via YAML only.", entities: { label: "Entity patterns (one per line)", helper: "Wildcards (*) are supported", placeholder: `sensor.temperature_*
climate.*
light.living_*` }, exclude: { label: "Exclude patterns", placeholder: `*_battery
*_unavailable
light.*` }, label: { title: "Label", prefix: "Prefix", suffix: "Suffix", find: "Find", replace: "Replace with", find_placeholder: "Temperature", replace_placeholder: "Temp" }, value: { title: "Value", prefix: "Prefix", suffix: "Suffix", suffix_placeholder: "%", precision: "Decimal places", abbreviate: "Abbreviate large numbers (k, M, B)" }, icon: { title: "Icon", override: "Override icon" }, sparkline: { title: "Sparkline", period: "Period", period_12h: "12 hours", period_24h: "24 hours", period_7d: "7 days", period_30d: "30 days", mode: "Mode", mode_dark: "Dark", mode_light: "Light", show_line: "Show line", show_fill: "Show fill", show_hvac: "Show HVAC bars (climate entities)", min: "Y-axis min", max: "Y-axis max" }, colors: { title: "Colors", target: "Apply color to", target_background: "Background", target_foreground: "Foreground (text)", gradient: "Color gradient (low → mid → high)", low: "Low ≤", mid: "Mid =", high: "High ≥", auto: "auto", middle: "middle", hvac_colors: "HVAC colors (climate entities)", heating: "Heating", cooling: "Cooling", off: "Off", unavailable: "Unavailable" }, size: { title: "Size", equal: "Equal size rectangles", inverse: "Inverse (low values = bigger)", min: "Min", max: "Max" }, layout: { title: "Layout", height: "Height (px)", gap: "Gap (px)" }, footer: { docs: "Docs", issues: "Bug or idea?", star: "Like it? Star it!" }, actions: { title: "Actions", tap_action: "Tap action", hold_action: "Hold action" }, data: { title: "Data", order: "Order", desc: "Descending (high first)", asc: "Ascending (low first)", sort_by: "Sort by", sort_by_value: "Value (optimal layout)", sort_by_entity_id: "Entity ID", sort_by_label: "Label", sort_by_default: "Config order", limit: "Limit", all: "all", above: "Filter above", below: "Filter below", unavailable: "Include unavailable entities" } }, Ji = {
light.*` }, label: { title: "Label", prefix: "Prefix", suffix: "Suffix", find: "Find", replace: "Replace with", find_placeholder: "Temperature", replace_placeholder: "Temp" }, value: { title: "Value", prefix: "Prefix", suffix: "Suffix", suffix_placeholder: "%", precision: "Decimal places", abbreviate: "Abbreviate large numbers (k, M, B)" }, icon: { title: "Icon", override: "Override icon" }, sparkline: { title: "Sparkline", period: "Period", period_12h: "12 hours", period_24h: "24 hours", period_7d: "7 days", period_30d: "30 days", mode: "Mode", mode_dark: "Dark", mode_light: "Light", show_line: "Show line", show_fill: "Show fill", show_hvac: "Show HVAC bars (climate entities)", min: "Y-axis min", max: "Y-axis max" }, colors: { title: "Colors", target: "Apply color to", target_background: "Background", target_foreground: "Foreground (text)", gradient: "Color gradient (low → mid → high)", low: "Low ≤", mid: "Mid =", high: "High ≥", auto: "auto", middle: "middle", hvac_colors: "HVAC colors (climate entities)", heating: "Heating", cooling: "Cooling", off: "Off", unavailable: "Unavailable" }, size: { title: "Size", equal: "Equal size rectangles", inverse: "Inverse (low values = bigger)", min: "Min", max: "Max" }, layout: { title: "Layout", height: "Height (px)", gap: "Gap (px)" }, footer: { docs: "Docs", issues: "Bug or idea?", star: "Like it? Star it!" }, actions: { title: "Actions", tap_action: "Tap action", hold_action: "Hold action" }, data: { title: "Data", order: "Order", desc: "Descending (high first)", asc: "Ascending (low first)", sort_by: "Sort by", sort_by_value: "Value (optimal layout)", sort_by_entity_id: "Entity ID", sort_by_label: "Label", sort_by_default: "Config order", limit: "Limit", all: "all", above: "Filter above", below: "Filter below", unavailable: "Include unavailable entities" } }, Qi = {
editor: nt
}, Zi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
}, Ki = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
default: Ji,
default: Qi,
editor: nt
}, Symbol.toStringTag, { value: "Module" })), ot = { no_config: "Aucune configuration", yaml_only: "Le mode attribut JSON est configurable uniquement via YAML.", entities: { label: "Motifs d'entités (un par ligne)", helper: "Wildcards (*) supportés", placeholder: `sensor.temperature_*
climate.*
light.living_*` }, exclude: { label: "Motifs à exclure", placeholder: `*_battery
*_unavailable
light.*` }, label: { title: "Libellé", prefix: "Préfixe", suffix: "Suffixe", find: "Rechercher", replace: "Remplacer par", find_placeholder: "Température", replace_placeholder: "Temp" }, value: { title: "Valeur", prefix: "Préfixe", suffix: "Suffixe", suffix_placeholder: "%", precision: "Décimales", abbreviate: "Abréger les grands nombres (k, M, B)" }, icon: { title: "Icône", override: "Remplacer l'icône" }, sparkline: { title: "Sparkline", period: "Période", period_12h: "12 heures", period_24h: "24 heures", period_7d: "7 jours", period_30d: "30 jours", mode: "Mode", mode_dark: "Sombre", mode_light: "Clair", show_line: "Afficher la ligne", show_fill: "Afficher le remplissage", show_hvac: "Afficher les barres HVAC (entités climatiques)", min: "Min axe Y", max: "Max axe Y" }, colors: { title: "Couleurs", target: "Appliquer la couleur à", target_background: "Arrière-plan", target_foreground: "Premier plan (texte)", gradient: "Dégradé de couleur (bas → milieu → haut)", low: "Bas ≤", mid: "Milieu =", high: "Haut ≥", auto: "auto", middle: "milieu", hvac_colors: "Couleurs HVAC (entités climatiques)", heating: "Chauffage", cooling: "Climatisation", off: "Éteint", unavailable: "Indisponible" }, size: { title: "Taille", equal: "Rectangles de taille égale", inverse: "Inverse (valeurs basses = plus grand)", min: "Min", max: "Max" }, layout: { title: "Disposition", height: "Hauteur (px)", gap: "Espacement (px)" }, footer: { docs: "Docs", issues: "Bug ou idée?", star: "Vous aimez? Étoile!" }, actions: { title: "Actions", tap_action: "Action au tap", hold_action: "Action au maintien" }, data: { title: "Données", order: "Ordre", desc: "Décroissant (haut en premier)", asc: "Croissant (bas en premier)", limit: "Limite", all: "tous", above: "Filtrer au-dessus", below: "Filtrer en-dessous", unavailable: "Inclure les entités indisponibles", sort_by: "Trier par", sort_by_value: "Valeur (disposition optimale)", sort_by_entity_id: "ID d'entité", sort_by_label: "Étiquette", sort_by_default: "Ordre de configuration" } }, Xi = {
light.*` }, label: { title: "Libellé", prefix: "Préfixe", suffix: "Suffixe", find: "Rechercher", replace: "Remplacer par", find_placeholder: "Température", replace_placeholder: "Temp" }, value: { title: "Valeur", prefix: "Préfixe", suffix: "Suffixe", suffix_placeholder: "%", precision: "Décimales", abbreviate: "Abréger les grands nombres (k, M, B)" }, icon: { title: "Icône", override: "Remplacer l'icône" }, sparkline: { title: "Sparkline", period: "Période", period_12h: "12 heures", period_24h: "24 heures", period_7d: "7 jours", period_30d: "30 jours", mode: "Mode", mode_dark: "Sombre", mode_light: "Clair", show_line: "Afficher la ligne", show_fill: "Afficher le remplissage", show_hvac: "Afficher les barres HVAC (entités climatiques)", min: "Min axe Y", max: "Max axe Y" }, colors: { title: "Couleurs", target: "Appliquer la couleur à", target_background: "Arrière-plan", target_foreground: "Premier plan (texte)", gradient: "Dégradé de couleur (bas → milieu → haut)", low: "Bas ≤", mid: "Milieu =", high: "Haut ≥", auto: "auto", middle: "milieu", hvac_colors: "Couleurs HVAC (entités climatiques)", heating: "Chauffage", cooling: "Climatisation", off: "Éteint", unavailable: "Indisponible" }, size: { title: "Taille", equal: "Rectangles de taille égale", inverse: "Inverse (valeurs basses = plus grand)", min: "Min", max: "Max" }, layout: { title: "Disposition", height: "Hauteur (px)", gap: "Espacement (px)" }, footer: { docs: "Docs", issues: "Bug ou idée?", star: "Vous aimez? Étoile!" }, actions: { title: "Actions", tap_action: "Action au tap", hold_action: "Action au maintien" }, data: { title: "Données", order: "Ordre", desc: "Décroissant (haut en premier)", asc: "Croissant (bas en premier)", limit: "Limite", all: "tous", above: "Filtrer au-dessus", below: "Filtrer en-dessous", unavailable: "Inclure les entités indisponibles", sort_by: "Trier par", sort_by_value: "Valeur (disposition optimale)", sort_by_entity_id: "ID d'entité", sort_by_label: "Étiquette", sort_by_default: "Ordre de configuration" } }, en = {
editor: ot
}, Qi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
}, tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
default: Xi,
default: en,
editor: ot
}, Symbol.toStringTag, { value: "Module" })), Le = {
de: Yi,
en: Zi,
fr: Qi
de: Xi,
en: Ki,
fr: tn
};
function Ki(t) {
function nn(t) {
return typeof t == "object" && t !== null;
}
function Ue(t, e) {
const i = e.split(".");
let n = t;
for (const s of i)
if (n && Ki(n) && s in n)
if (n && nn(n) && s in n)
n = n[s];
else
return;
return typeof n == "string" ? n : void 0;
}
function en(t) {
function on(t) {
return (t?.language ?? "en").split("-")[0] ?? "en";
}
function tn(t, e) {
const i = en(t), n = Le[i];
function sn(t, e) {
const i = on(t), n = Le[i];
if (n) {
const s = Ue(n, e);
if (s) return s;
@@ -2474,10 +2485,10 @@ function tn(t, e) {
}
return e;
}
var nn = Object.defineProperty, on = Object.getOwnPropertyDescriptor, ue = (t, e, i, n) => {
for (var s = n > 1 ? void 0 : n ? on(e, i) : e, o = t.length - 1, r; o >= 0; o--)
var rn = Object.defineProperty, an = Object.getOwnPropertyDescriptor, he = (t, e, i, n) => {
for (var s = n > 1 ? void 0 : n ? an(e, i) : e, o = t.length - 1, r; o >= 0; o--)
(r = t[o]) && (s = (n ? r(e, i, s) : r(s)) || s);
return n && s && nn(e, i, s), s;
return n && s && rn(e, i, s), s;
};
const ne = "https://github.com/omachala/ha-treemap-card";
function Y(t) {
@@ -2488,7 +2499,7 @@ function Y(t) {
}
return "";
}
function sn(t) {
function ln(t) {
const e = t.target;
return e instanceof HTMLInputElement ? e.checked : !1;
}
@@ -2506,7 +2517,7 @@ let H = class extends B {
* Shorthand for localize with current hass context
*/
_t(t) {
return tn(this.hass, t);
return sn(this.hass, t);
}
_fireConfigChanged() {
this._config && this.dispatchEvent(
@@ -2530,7 +2541,7 @@ let H = class extends B {
*/
_handleBoolChange(t, e) {
if (!this._config) return;
const i = sn(e);
const i = ln(e);
this._config = N({ ...this._config }, t, i), this._fireConfigChanged();
}
/**
@@ -3092,20 +3103,20 @@ let H = class extends B {
`;
}
};
H.styles = Wi;
ue([
ce({ attribute: !1 })
H.styles = Ji;
he([
le({ attribute: !1 })
], H.prototype, "hass", 2);
ue([
ce({ attribute: !1 })
he([
le({ attribute: !1 })
], H.prototype, "lovelace", 2);
ue([
he([
ve()
], H.prototype, "_config", 2);
H = ue([
H = he([
Je("treemap-card-editor")
], H);
const rn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
const cn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
get TreemapCardEditor() {
return H;