278 files

This commit is contained in:
Home Assistant Version Control committed 2026-09-13 20:38:58 +00:00
1 parent d7a0a08372
commit 1b4f5f68c6
278 files changed
+36892 -7150

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 } from "./styles";
import { syncLocaleFromHass, sharedStyles, STATUS_COLORS, t, ensureLocale, isLocaleLoaded, setProfilePrefs, formatDueDays, langOf, currencySymbolOf, syncCurrencyDecimals} from "./styles";
import { openSignedDocument } from "./helpers/document-url";
import { isSafeHttpUrl } from "./helpers/url";
import { registerCustomCard } from "./helpers/register-card";
@@ -173,6 +173,7 @@ export class MaintenanceSupporterCard extends LitElement {
]);
this._objects = hydrateObjects((objResult as { objects: MaintenanceObjectResponse[] }).objects);
this._stats = statsResult as StatisticsResponse;
syncCurrencyDecimals(this._stats.budget);
} catch {
// WS not available yet
}
@@ -468,7 +469,7 @@ export class MaintenanceSupporterCard extends LitElement {
({ entry_id, object_name, task }) => html`
<div class="task-item clickable"
@click=${() => this._openTaskDetail(entry_id, task.id)}
title="${t("open_task", L) || "Open task"}">
title="${t("open_task", L)}">
<div class="status-dot" style="background: ${STATUS_COLORS[task.status] || "#ccc"}"></div>
<div class="task-info">
<div class="task-name">
@@ -477,7 +478,7 @@ export class MaintenanceSupporterCard extends LitElement {
? html`<ha-icon
class="postponed-icon"
icon="mdi:calendar-clock"
title="${t("postponed", L) || "Postponed"}"
title="${t("postponed", L)}"
></ha-icon>`
: nothing}
</div>
@@ -541,7 +542,7 @@ export class MaintenanceSupporterCard extends LitElement {
lang: L,
checklist: task.checklist || [],
adaptiveEnabled: !!task.adaptive_config?.enabled,
currencySymbol: this._stats?.budget?.currency_symbol || "",
currencySymbol: currencySymbolOf(this._stats?.budget),
}),
L,
);
@@ -574,7 +575,7 @@ export class MaintenanceSupporterCard extends LitElement {
lang: L,
checklist: task.checklist || [],
adaptiveEnabled: !!task.adaptive_config?.enabled,
currencySymbol: this._stats?.budget?.currency_symbol || "",
currencySymbol: currencySymbolOf(this._stats?.budget),
}),
L,
);
@@ -748,6 +749,10 @@ if (!customElements.get("maintenance-supporter-card")) {
customElements.define("maintenance-supporter-card", MaintenanceSupporterCard);
}
// #174: the whole panel as a card — a tiny wrapper that lazy-imports the
// panel bundle HA registered for the sidebar (same module, defined once).
import "./maintenance-panel-card";
// Register as custom card so the Lovelace card picker lists it.
registerCustomCard({
type: "maintenance-supporter-card",