Format the panel and admin date and clock in the stored application timezone
The panel snapshot now carries the admin-saved `timezone` ("" when unset);
the coordinator threads it onto the household due-today sensor, and the
Party Board and Quest Log cards format their kicker, header and dock
date and clock in it, falling back to Home Assistant's zone only when
none is stored. The admin app loads the stored zone once
(AppTimezoneProvider) and uses it for completion clocks, History day
grouping, clocks and lateness, and "today" in Schedule, History and new
task defaults; Settings publishes a saved zone app-wide at once.
Resolves review finding TZ-001 (task 7e173881).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -937,8 +937,16 @@ export class NestQuestPartyBoardCard extends LitElement {
|
||||
`;
|
||||
}
|
||||
|
||||
/** The zone the visible date and clock render in: the application
|
||||
* timezone the admin stored (published on the household rollup by
|
||||
* custom_components/nestquest/sensor.py — ``timezone``). Only when
|
||||
* none is stored does Home Assistant's zone (or the browser's) apply. */
|
||||
private _timeZone(): string | undefined {
|
||||
return hassTimeZone(this.hass);
|
||||
const stored = this._state("sensor.nestquest_household_quests_due_today")
|
||||
?.attributes?.timezone;
|
||||
return typeof stored === "string" && stored.trim()
|
||||
? stored.trim()
|
||||
: hassTimeZone(this.hass);
|
||||
}
|
||||
|
||||
private _state(entityId: string): StateObject | null {
|
||||
|
||||
@@ -1749,8 +1749,16 @@ export class NestQuestQuestLogCard extends LitElement {
|
||||
`;
|
||||
}
|
||||
|
||||
/** The zone the visible date and clock render in: the application
|
||||
* timezone the admin stored (published on the household rollup by
|
||||
* custom_components/nestquest/sensor.py — ``timezone``). Only when
|
||||
* none is stored does Home Assistant's zone (or the browser's) apply. */
|
||||
private _timeZone(): string | undefined {
|
||||
return hassTimeZone(this.hass);
|
||||
const stored = this._state("sensor.nestquest_household_quests_due_today")
|
||||
?.attributes?.timezone;
|
||||
return typeof stored === "string" && stored.trim()
|
||||
? stored.trim()
|
||||
: hassTimeZone(this.hass);
|
||||
}
|
||||
|
||||
private _state(entityId: string): StateObject | null {
|
||||
|
||||
Reference in New Issue
Block a user