Skip to content

[ISSUE] Primary-standby overdue/missed notifications send spurious approver alerts for every standby user #213

Description

@ccpk1

Home Assistant version

2026.07

ChoreOps integration version

1.5.0

Installation method

HACS

Prerequisites

  • I checked for existing open and closed issues
  • I updated ChoreOps (or confirmed the issue still occurs on the latest version)
  • If this is a dashboard issue, I updated dashboard dependencies such as button-card and confirmed the issue still occurs
  • I enabled debug logging and can share logs

Issue scope

Integration logic/state

Steps to reproduce

Reproduction Steps

  1. Create a primary-standby chore with 1 primary + multiple standbys (e.g., primary=Kaden, standbys=Payton, Caren, Chad)
  2. Ensure some standbys are also approvers of other assigned users (e.g., Caren and Chad are approvers of Kaden and Payton)
  3. Let the chore go overdue
  4. Observe the notification storm

Observed Behavior (with Kaden=primary, Payton/Caren/Chad=standbys)

Chad receives:

  • ✅ "⚠️ Kaden: Chore Overdue — Kaden's chore Clean Litter AM" (correct — as approver of the primary)
  • ❌ "⚠️ Payton: Chore Overdue — Payton's chore Clean Litter AM" (wrong — Payton is standby, not overdue)
  • ✅ "🫲 Standby Requested: Kaden's chore..." (correct — as a standby assignee)
  • ❌ "⚠️ Chad: Chore Overdue — Chad's chore Clean Litter AM" (wrong — as self-approver)

Caren receives the same set minus the Chad notification.

Issue description

Description

When a primary-standby chore goes overdue, approver notifications are incorrectly sent for every assigned user (primary + all standbys), not just the primary. This causes approvers who are also assigned as standbys to receive a flood of incorrect notifications.

Relevant entity IDs (optional)

No response

Logs

Additional context

Root Cause

_send_overdue_notification_to_assignee() in notification_manager.py always calls notify_approvers_translated() at the end, regardless of whether the current entry is for the primary or a standby user. The approver notification template says "{assignee_name}'s chore {chore_name} is overdue", which is only correct when assignee_name is the primary.

The scanner (process_time_checks) creates overdue entries for all assigned users (needed so standbys receive their "Standby Requested" notification), but the approver notification should only fire for the primary's entry.

Affected Handlers

  1. _handle_chore_overdue — guard the approver notification block when overdue_message_type == STANDBY_NEEDED (the overdue_message_type is already in the payload)
  2. _handle_chore_missed — same issue when using MARK_MISSED_AND_LOCK behavior. Needs a check on the chore's completion_criteria and rotation_current_assignee_id to skip approver notification for standbys

Proposed Fix

In _send_overdue_notification_to_assignee(): wrap the notify_approvers_translated call so it's skipped when overdue_message_type == STANDBY_NEEDED.

# Only send approver notifications for the primary's overdue
# Standbys are being asked to cover — don't tell approvers the standby is overdue
if overdue_message_type != const.CHORE_OVERDUE_NOTIFICATION_TYPE_STANDBY_NEEDED:
    await self.notify_approvers_translated(...)

In _handle_chore_missed(): add a similar guard that checks if the chore is primary-standby and the current assignee is not the current turn-holder.

# Skip approver notification for standbys in primary-standby mode
if ChoreEngine.is_rotation_mode(chore_info):
    current_turn = chore_info.get(const.DATA_CHORE_ROTATION_CURRENT_ASSIGNEE_ID)
    if current_turn and current_turn != assignee_id:
        record_only = True  # Skip approver notify

Metadata

Metadata

Assignees

Labels

area: integrationIntegration logic and statebugSomething is not workingneeds-infoMissing required details from reporter

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions