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. π