Problem
When a chore is completed and needs approval, the completer sees the "… awaiting approval" notification and the parent does not — the reverse of what should happen.
Two causes:
- Leak:
NotificationCoordinator.fire() called persistent_notification.create unconditionally for every notification, ignoring audience and routing. persistent_notification is instance-wide (every HA user sees it in the bell), so a parent-audience message surfaced to whoever was viewing HA — typically the child on a kiosk who just completed the chore. (coord_notifications.py)
- Gap: the default route seeding only wires a parent in if a legacy
notify_service existed at migration. A parent recipient added later (via the panel) is left with empty routes for pending_chore_approval / pending_reward_claim, so no parent is notified. Verified on ha-dev: pending_chore_approval had routes: {} while a "John" parent recipient existed.
Fix
- Remove the unconditional persistent notification from
fire(). A persistent notification now happens only when a recipient is explicitly routed to notify.persistent_notification, via the normal _send_to path. (send_test keeps its persistent confirmation.)
- Add
ensure_parent_default_routes(): subscribes enabled parents to default-on parent-audience types whose routes are still empty (never overrides explicit/cleared routing). Called on parent upsert and once at coordinator init (fixes existing installs).
Note for true per-person delivery: notify.persistent_notification is itself instance-wide; to have only the parent notified, the parent recipient should use a per-person channel (e.g. notify.mobile_app_johns_iphone).
Problem
When a chore is completed and needs approval, the completer sees the "… awaiting approval" notification and the parent does not — the reverse of what should happen.
Two causes:
NotificationCoordinator.fire()calledpersistent_notification.createunconditionally for every notification, ignoring audience and routing.persistent_notificationis instance-wide (every HA user sees it in the bell), so a parent-audience message surfaced to whoever was viewing HA — typically the child on a kiosk who just completed the chore. (coord_notifications.py)notify_serviceexisted at migration. A parent recipient added later (via the panel) is left with empty routes forpending_chore_approval/pending_reward_claim, so no parent is notified. Verified on ha-dev:pending_chore_approvalhadroutes: {}while a "John" parent recipient existed.Fix
fire(). A persistent notification now happens only when a recipient is explicitly routed tonotify.persistent_notification, via the normal_send_topath. (send_testkeeps its persistent confirmation.)ensure_parent_default_routes(): subscribes enabled parents to default-on parent-audience types whose routes are still empty (never overrides explicit/cleared routing). Called on parent upsert and once at coordinator init (fixes existing installs).Note for true per-person delivery:
notify.persistent_notificationis itself instance-wide; to have only the parent notified, the parent recipient should use a per-person channel (e.g.notify.mobile_app_johns_iphone).