209 files

This commit is contained in:
Home Assistant Version Control committed 2026-10-07 13:11:05 +00:00
1 parent 4fef64cc2c
commit 983811cb93
209 files changed
+714 -26066

No files matched your search

@@ -4,7 +4,7 @@ import { LitElement, html, css, nothing } from "lit";
import { applySubscriptionEvent, type SubscriptionEvent } from "./helpers/subscription-merge";
import { hydrateObjects } from "./helpers/hydrate-objects";
import { property, state } from "lit/decorators.js";
import { syncLocaleFromHass, sharedStyles, STATUS_COLORS, t, ensureLocale, isLocaleLoaded, setProfilePrefs, formatDueDays, langOf, currencySymbolOf, syncCurrencyDecimals} from "./styles";
import { syncLocaleFromHass, sharedStyles, STATUS_COLORS, t, ensureLocale, isLocaleLoaded, setProfilePrefs, formatDueDays, formatLastDone, formatDate, langOf, currencySymbolOf, syncCurrencyDecimals} from "./styles";
import { openSignedDocument } from "./helpers/document-url";
import { isPhotoDocument } from "./helpers/document-categories";
import { isSafeHttpUrl } from "./helpers/url";
@@ -207,6 +207,15 @@ export class MaintenanceSupporterCard extends LitElement {
this._firstLoadDone = true;
}
/** A task without a due date (manual, sensor-only, paused): when it was
* last done, "done 23 d ago" (D#203) — a dash only when never done. */
private _lastDone(task: MaintenanceTask, L: string) {
const done = formatLastDone(task.last_performed, L);
return done
? html`<span class="last-done" title="${t("last_performed", L)}: ${formatDate(task.last_performed, L)}">${done}</span>`
: "—";
}
/** Display name of the task's responsible user, or "" when the badge must
* stay hidden (feature off, nobody assigned, or the name not resolved).
* With a rotation this is whoever is up next — the pointer the engine
@@ -603,7 +612,7 @@ export class MaintenanceSupporterCard extends LitElement {
: formatDueDays(task.days_until_due, L)
: task.trigger_active
? "⚡"
: "—"}
: this._lastDone(task, L)}
</div>
${showActions && useButtons
? html`