251 files

This commit is contained in:
Home Assistant Version Control
2026-10-16 12:38:25 +00:00
parent 3acf0cdf8d
commit 64eb0c647c
251 changed files with 6380 additions and 14560 deletions
@@ -233,7 +233,7 @@ class TaskMateKioskCard extends LitElement {
};
const configured = Array.isArray(this.config.children) ? this.config.children : null;
if (!configured) {
return all.filter(c => !c.is_guest).map(c => ({ child: c, requirePin: true, tone: tone(c) }));
return (window.__taskmate_family_children ? window.__taskmate_family_children(all, this.config) : all).filter(c => !c.is_guest).map(c => ({ child: c, requirePin: true, tone: tone(c) }));
}
const out = [];
for (const entry of configured) {
@@ -798,7 +798,12 @@ class TaskMateKioskCard extends LitElement {
// ── Render ───────────────────────────────────────────────────────────────
_face(child, tone, size = "") {
const avatar = child.avatar || "";
// The child's photo first (the shared face helper), then their avatar.
const face = window.__taskmate_child_visual ? window.__taskmate_child_visual(child) : { kind: "none" };
if (face.kind === "image") {
return html`<div class="km-face ${size}" style="--kc:${tone}"><img src="${face.url}" alt=""></div>`;
}
const avatar = face.kind === "icon" ? face.icon : "";
// The default avatar is a generic silhouette, so a child who never picked
// one gets their initial instead — easier to tell apart on a picker.
const icon = avatar.startsWith("mdi:") && avatar !== "mdi:account-circle";
@@ -1256,6 +1261,7 @@ class TaskMateKioskCard extends LitElement {
box-shadow: 0 0 0 6px color-mix(in srgb, var(--kc) 25%, transparent);
}
.km-face ha-icon { --mdc-icon-size: 72px; }
.km-face img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.km-face.big { width: 160px; height: 160px; font-size: 76px; }
.km-face.big ha-icon { --mdc-icon-size: 90px; }
.km-face.head {
@@ -1729,7 +1735,7 @@ class TaskMateKioskCardEditor extends LitElement {
const attrs = (window.__taskmate_attrs && window.__taskmate_attrs(this.hass, this.config.entity || "sensor.taskmate_overview")) || {};
const all = attrs.children || [];
const configured = Array.isArray(this.config.children) ? this.config.children : null;
if (!configured) return all.map(c => ({ child: c, shown: !c.is_guest, requirePin: true }));
if (!configured) return all.map(c => ({ child: c, shown: !c.is_guest && (!c.is_adult || this.config.show_adults === true), requirePin: true }));
const rows = [];
for (const entry of configured) {
const child = all.find(c => String(c.id) === String(entry && (entry.child_id ?? entry)));