Service: Set Chore Due Dates - ad-ha/kidschores-ha GitHub Wiki

A new service has been implemented that allows setting the due date of a chore dynamically. This provides flexibility for assigning tasks as needed, rather than relying solely on recurring schedules.


πŸ“ Key Use Cases

1️⃣ Assigning One-Time Chores in the Dashboard

  • Some chores, like "Pick up sticks in the yard", don’t need a fixed schedule.
  • This service allows manually assigning a due date to these types of tasks when necessary.
  • Example: A parent can press a button to add the chore to the kid’s to-do list with a set deadline.

2️⃣ Automating Chores Based on Calendar Events

  • Some chores depend on variable schedules, such as trash pickup that changes weekly.
  • An automation can be set up to detect a calendar event and apply a due date for the corresponding chore.
  • Example: If the trash pickup day is Monday one week and Tuesday the next, an automation can dynamically set "Take Garbage Out" to match the correct schedule.

βš™οΈ How It Works

πŸ•’ Due Dates & Recurrence Handling

  • If a chore has no recurrence, assigning a due date will only apply once.
  • Once the chore is completed and approved, the due date is cleared automatically, returning it to its default state.
  • If the chore has a recurrence, the due date will be updated per its normal schedule.

πŸ”„ Interaction with Chore States

  • If a pending chore gets a due date, it will stay in the pending state until completed.
  • The system ensures the state is either "Pending" or "Overdue" when a due date is applied.
  • If a chore is already approved and then assigned a future due date, it will stay in the approved state until that date is reached.
    • At that point, it will reset automatically per the normal process.
    • Alternatively, an automation can be used to reset the chore manually before the due date.

πŸ› οΈ Practical Example Scenarios

Scenario Outcome
Assign a due date to a chore with no recurrence The chore is scheduled once and resets after approval.
Assign a due date to a recurring chore The due date updates per its recurrence pattern.
Assign a due date to a pending chore The state remains pending until the due date.
Assign a due date to an approved chore The chore remains approved until the due date is reached.
Manually clear a due date The chore returns to its default state.

⚑ Action Name:

KidsChores: Set/Reset Chore Due Date

πŸ› οΈ Usage Example:

action: kidschores.set_chore_due_date
data:
  chore_name: Wash Dishes
  due_date: 2025-03-01T23:59:00.000Z

➑ Leave due_date empty to clear the due date.


πŸ“Œ Parameters

πŸ”Ή Parameter πŸ” Description πŸ“– Example
chore_name The name of the chore to update. Wash Dishes
due_date The new due date for the chore. Use the date/time selector to choose a valid date and time (in your local timezone). Leave empty to clear the due date. 2025-03-01T23:59:00Z

πŸš€ Summary: Why This Service is Useful

βœ” Allows assigning chores dynamically without requiring a schedule.
βœ” Enables automation of chore assignments based on real-world conditions (e.g., trash schedules).
βœ” Ensures chore state behaves logically based on approval, recurrence, and due dates.
βœ” Provides flexibility for parents to adjust and reset tasks as needed.

This service brings a new level of automation and flexibility to the chore system, making it easier to manage both scheduled and ad-hoc tasks. πŸš€