Remove every automatic timezone-setting mechanism (task 7f685179)
The application timezone is now only ever set by an admin saving it: - API: drop adopt_reported_timezone; the panel household clock reads the stored settings only and ignores any timezone request header. - Integration: stop reporting Home Assistant's time_zone in an X-NestQuest-Timezone header (snapshot, completion and SSE requests). - Admin app: remove the browser-zone detection and the automatic PATCH on load; the timezone field stays a manual control. - Remove the timezone_configured marker from the core settings, the settings store and the admin settings API. A stored document that still carries the key loads harmlessly (unknown keys are ignored). Tests replace the adoption expectations with proofs that a panel timezone header never changes the stored settings, a fresh install's empty zone stays empty with no settings write, the admin settings carry no timezone_configured, and a manual admin timezone PATCH persists. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -114,24 +114,11 @@ CONF_CELEBRATION_ENABLED = "celebration_enabled"
|
||||
DEFAULT_AUTOMATION_ENABLED = True
|
||||
# The household's IANA time zone (e.g. ``America/New_York``) the API
|
||||
# service reads its clock in. The empty string is the API host's own
|
||||
# local time. While the admin has not chosen a zone
|
||||
# (``timezone_configured`` is ``False``) the API adopts the zone the
|
||||
# integration reports from Home Assistant's configured ``time_zone``
|
||||
# (:data:`PANEL_TIMEZONE_HEADER`), so the default is the household's
|
||||
# zone without any manual setup. The integration itself always uses
|
||||
# local time. Only an admin sets it (manually, from the admin app);
|
||||
# nothing sets it automatically. The integration itself always uses
|
||||
# Home Assistant's ``time_zone`` and ignores this field.
|
||||
CONF_TIMEZONE = "timezone"
|
||||
DEFAULT_TIMEZONE = ""
|
||||
# Whether the admin has made an explicit ``timezone`` choice. ``False``
|
||||
# (a fresh install) lets the API follow Home Assistant's reported zone
|
||||
# and the admin UI auto-set the browser's zone once while none is
|
||||
# stored; ``True`` pins the stored value — including an explicitly-chosen
|
||||
# empty ``timezone`` (the API host's local time) — so neither changes it.
|
||||
CONF_TIMEZONE_CONFIGURED = "timezone_configured"
|
||||
DEFAULT_TIMEZONE_CONFIGURED = False
|
||||
# The panel-plane request header carrying Home Assistant's configured
|
||||
# IANA ``time_zone`` from the integration to the API service.
|
||||
PANEL_TIMEZONE_HEADER = "X-NestQuest-Timezone"
|
||||
|
||||
# Panel-plane API client (Feature 18): the integration reaches the
|
||||
# NestQuest API service (Feature 16) over HTTP instead of the database.
|
||||
|
||||
Reference in New Issue
Block a user