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:
@@ -686,8 +686,8 @@ async def test_coordinator_configured_token_builds_real_client(
|
||||
hass, entry, session_factory=_session_factory
|
||||
)
|
||||
assert isinstance(real_client, NestQuestApiClient)
|
||||
# Home Assistant's zone is reported to the API (task 6351b36d).
|
||||
assert real_client._household_timezone == hass.config.time_zone
|
||||
# Home Assistant's zone is not reported to the API (task 7f685179).
|
||||
assert real_client._headers() == {"Authorization": "Bearer tok"}
|
||||
|
||||
set_coordinator_client(entry, real_client)
|
||||
assert await async_setup_entry(hass, entry) is True
|
||||
|
||||
Reference in New Issue
Block a user