Correct remaining Home Assistant-derived timezone comments (task e9aa78f3)
The CONF_TIMEZONE comment claimed the integration always uses Home Assistant's time_zone and ignores the field; it actually relays the API's effective application timezone. Also reword two materialize.py docstrings that described the household date as HA-derived. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -115,8 +115,12 @@ 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. 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.
|
||||
# nothing sets it automatically. The integration relays the API's
|
||||
# effective application timezone (the coordinator carries it and the
|
||||
# household sensor publishes it for the panel cards) and never derives
|
||||
# the application clock from Home Assistant's configuration; the Home
|
||||
# Assistant / browser zone applies only when the API publishes no zone
|
||||
# (e.g. an older API).
|
||||
CONF_TIMEZONE = "timezone"
|
||||
DEFAULT_TIMEZONE = ""
|
||||
|
||||
|
||||
@@ -259,8 +259,8 @@ async def materialize(
|
||||
no-past guard compares against; it is threaded into every
|
||||
:meth:`~.dao_instances.QuestInstancesDao.upsert_if_valid` write. When
|
||||
omitted the host clock (``datetime.date.today``) is used, which is the
|
||||
historical default. A caller that computed the horizon in Home
|
||||
Assistant's configured time zone MUST pass that same date here so a
|
||||
historical default. A caller that computed the horizon in the
|
||||
household's application time zone MUST pass that same date here so a
|
||||
time zone behind the host around midnight is not rejected as "past".
|
||||
|
||||
``start_date`` is clamped up to the resolved "today" (the same
|
||||
@@ -415,7 +415,7 @@ async def regenerate_for_child(
|
||||
execution-day anchor even when the call is queued across midnight.
|
||||
``today`` optionally pins a caller-resolved household-local date, threaded
|
||||
into the delete cutoff and the re-materialization for the same
|
||||
host-vs-HA time-zone consistency. ``horizon_days`` sizes the
|
||||
host-vs-household time-zone consistency. ``horizon_days`` sizes the
|
||||
re-materialization window; when omitted it falls back to
|
||||
:data:`~.const.DEFAULT_HORIZON_DAYS`. A bool, non-int, or sub-1 value
|
||||
raises ValueError BEFORE any delete. Returns the number of instances
|
||||
|
||||
Reference in New Issue
Block a user