Feature 10: the entities and events that make NestQuest visible to the rest of HA. Per-child sensors (quests due/completed/remaining today with the panel instances payload omitting missed + admin payload including them per D-009, completion pct at 100 on zero-quest days, next quest with the none sentinel), all-done and present-today binary sensors, household rollups and the anchor-date cycle-day sensor (D-004), a shared NestQuestCoordinator (CONF_UPDATE_INTERVAL, default 5 min) every entity reads, bus events nestquest_quest_completed / _uncompleted / child_day_complete fired on actual transitions with documented payloads (quest_missed defined as Feature 11's contract; README documents them), immediate serialized refreshes after completion service calls, and the entity lifecycle for child add/deactivate/reactivate.
Task PRs: #105#106#107#108#109#110#111#112#113. Feature-level Codex review: two P2s fixed (was_on_time carried on the completion result under the lock; coordinator shutdown reordered before the database close on unload).
uv run pytest: 1413 passed. Schema unchanged (version 6); no migration.
Feature 10: the entities and events that make NestQuest visible to the rest of HA. Per-child sensors (quests due/completed/remaining today with the panel instances payload omitting missed + admin payload including them per D-009, completion pct at 100 on zero-quest days, next quest with the none sentinel), all-done and present-today binary sensors, household rollups and the anchor-date cycle-day sensor (D-004), a shared NestQuestCoordinator (CONF_UPDATE_INTERVAL, default 5 min) every entity reads, bus events nestquest_quest_completed / _uncompleted / child_day_complete fired on actual transitions with documented payloads (quest_missed defined as Feature 11's contract; README documents them), immediate serialized refreshes after completion service calls, and the entity lifecycle for child add/deactivate/reactivate.
Task PRs: #105 #106 #107 #108 #109 #110 #111 #112 #113. Feature-level Codex review: two P2s fixed (was_on_time carried on the completion result under the lock; coordinator shutdown reordered before the database close on unload).
`uv run pytest`: 1413 passed. Schema unchanged (version 6); no migration.
One refresh pass builds the whole entity snapshot: active children,
today's instances with derived open/done/missed states, per-child
presence via the PresenceEngine (records converted to model objects),
rollup counts, and the custody cycle day. Interval configurable via
the new update_interval option, default five minutes.
The setup except path closes the database; the coordinator created
above it now shuts down first so no listener can fire against the
closed connection. Regression test included.
Four sensors per active child read the coordinator snapshot: quests
due today (carrying the panel payload that omits missed instances plus
the admin payload that includes them, D-009), completed, remaining, and
completion percentage (100 on a zero-quest day). Platform forwarding
wired through the harness's entity registry stand-ins.
A False platform unload now returns False and retains the runtime
record so live entities keep their database. Sensor names and device
labels re-derive from the current snapshot so child renames
propagate; unique_ids stay child-id based.
State carries the earliest open quest's title truncated under the
255-character limit with the full shape in attributes; the documented
"none" sentinel is reported when the day is clear.
all_done is on exactly when the child owed quests today and owes none
remaining (a zero-quest day stays off so celebrations never fire on
an empty day); present_today mirrors the presence engine's answer
for the HA-local date.
Household quests due/completed today sum the active children's
snapshots; cycle day reports the first scheduled child's cycle
position (0 when nobody is scheduled), anchor-date arithmetic only.
quest_completed and quest_uncompleted fire on actual transitions with
documented payloads; child_day_complete fires when a completion clears
the child's day; quest_missed is defined as Feature 11's contract.
Payloads documented in the README for automation authors.
complete/uncomplete return a CompletionResult str subclass carrying
appended (decided with the write under the lock), so duplicate
concurrent calls fire one transition event; day-complete only
evaluates for an instance due today.
complete_quest and uncomplete_quest force a coordinator refresh when
the call appended, so entity states land the moment the service call
returns; scheduled internals are unaffected.
NestQuestCoordinator.async_refresh holds a per-entry lock so
overlapping service-path refreshes never interleave; the queued pass
always publishes after the in-flight one.
The harness tracks entities per entry so a platform unload removes
exactly that entry's entities; lifecycle tests prove deactivated
children drop out on reload, reactivation restores the original
unique_ids, new children appear without disturbing existing ones,
and the restart equivalent restores live states.
One fixture drives every Feature 10 contract: all per-child sensors
and binary sensors, household rollups, the 255-character limit,
the three events exactly once with schema-valid payloads, the
missed-instance omission rule, and no entities for inactive children.
The completed event's was_on_time travels on the CompletionResult
(decided with the write) instead of re-reading latest state a racing
reversal could replace; unload clears coordinator listeners before
the database close.
The completed event's was_on_time travels on the CompletionResult
(decided with the write) instead of re-reading latest state a racing
reversal could replace; unload clears coordinator listeners before
the database close.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Feature 10: the entities and events that make NestQuest visible to the rest of HA. Per-child sensors (quests due/completed/remaining today with the panel instances payload omitting missed + admin payload including them per D-009, completion pct at 100 on zero-quest days, next quest with the none sentinel), all-done and present-today binary sensors, household rollups and the anchor-date cycle-day sensor (D-004), a shared NestQuestCoordinator (CONF_UPDATE_INTERVAL, default 5 min) every entity reads, bus events nestquest_quest_completed / _uncompleted / child_day_complete fired on actual transitions with documented payloads (quest_missed defined as Feature 11's contract; README documents them), immediate serialized refreshes after completion service calls, and the entity lifecycle for child add/deactivate/reactivate.
Task PRs: #105 #106 #107 #108 #109 #110 #111 #112 #113. Feature-level Codex review: two P2s fixed (was_on_time carried on the completion result under the lock; coordinator shutdown reordered before the database close on unload).
uv run pytest: 1413 passed. Schema unchanged (version 6); no migration.