456 files

This commit is contained in:
Home Assistant Version Control
2026-10-01 05:38:21 +00:00
parent 4192ecbaae
commit 5d6d845ebf
456 changed files with 64951 additions and 3828 deletions
@@ -19,6 +19,7 @@ import { historyPhotoIds } from "../helpers/history-photos";
import { renderRefChip } from "../helpers/reference";
import { entryReadingValues } from "../helpers/reading-slots";
import { matchesQuery } from "../helpers/search-match";
import { historyNoteText } from "../helpers/history-note";
/** v2.2.0: only "lifecycle + cost-bearing" entries are user-editable.
* Triggers are auto-generated by sensors and shouldn't be retroactively
@@ -131,7 +132,13 @@ export function renderHistoryList(task: MaintenanceTask, ctx: HistoryContext) {
if (ctx.search) {
const search = ctx.search.toLowerCase();
// #170: "8.3-2" (or just "-2") in the notes filter finds the entry by number.
filtered = filtered.filter((h) => matchesQuery(h.notes, ctx.search) || (entryRefOf(ctx, h) ?? "").toLowerCase().endsWith(search));
// The shown (translated) text of a note the backend wrote matches too.
filtered = filtered.filter(
(h) =>
matchesQuery(h.notes, ctx.search) ||
matchesQuery(historyNoteText(h.notes, L), ctx.search) ||
(entryRefOf(ctx, h) ?? "").toLowerCase().endsWith(search),
);
}
if (filtered.length === 0) {
@@ -213,7 +220,7 @@ export function renderHistoryEntry(entry: HistoryEntry, ctx: HistoryEntryContext
: nothing}
</div>
<div class="history-date">${formatDateTime(entry.timestamp, L)}</div>
${entry.notes ? html`<div>${entry.notes}</div>` : nothing}
${entry.notes ? html`<div>${historyNoteText(entry.notes, L)}</div>` : nothing}
${renderHistoryPhotos(ctx.hass, entry)}
${renderHistoryReadings(entry, ctx)}
${entry.cost != null || entry.duration != null || entry.trigger_value != null