Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 22 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ know how it could be improved!
**This component will set up the following platforms.**

| Platform | Description |
| ---------- | ------------------------------------- |
| :--------- | :------------------------------------ |
| `sensor` | Contains the state for a single chore |
| `calendar` | A Chore calendar for easy tracking |

Expand Down Expand Up @@ -102,43 +102,47 @@ The other attributes are the next due date, the last completed date, whether the

This service can be called to mark a chore as completed. It will automatically schedule the next due date for the chore, and adjust future due dates if necessary (e.g. when scheduling "after" chores).

| Service Data Attribute | Optional | Description |
| ---------------------- | -------- | --------------------------------------------------------------------------------------- |
| `entity_id` | No | The entity ID of the chore or chores to complete. |
| `last_completed` | Yes | The date the chore was last completed. If not specified, the current date will be used. |
| Service Data Attribute | Type | Description |
| :--------------------- | :------- | :-------------------------------------------------------------------------------------- |
| `entity_id` | Required | The entity ID of the chore or chores to complete. |
| `last_completed` | Optional | The date the chore was last completed. If not specified, the current date will be used. |

### chore_helper.add_date

This service can be called to add a due date to a chore manually. This is useful for custom chores that don't have any due dates scheduled automatically.

| Service Data Attribute | Optional | Description |
| ---------------------- | -------- | ---------------------------------------------------------- |
| `entity_id` | No | The entity ID of the chore or chores to add a due date to. |
| `date` | No | The date the chore is due. |
| Service Data Attribute | Type | Description |
| :--------------------- | :------- | :--------------------------------------------------------- |
| `entity_id` | Required | The entity ID of the chore or chores to add a due date to. |
| `date` | Required | The date the chore is due. |

### chore_helper.offset_date

This service can be called to offset the next due date of a chore. This will only affect the next due date for "every" chores, but will affect all future due dates for "after" chores since they are fluid and based on the previous date.

| Service Data Attribute | Optional | Description |
| ---------------------- | -------- | ------------------------------------------------------------------------------- |
| `entity_id` | No | The entity ID of the chore or chores to offset the due date of. |
| `offset` | No | The number of days to offset the due date by. This can be positive or negative. |
| `date` | Yes | The date of the chore to offset, or the next due date if blank. |
| Service Data Attribute | Type | Description |
| :--------------------- | :------- | :------------------------------------------------------------------------------ |
| `entity_id` | Required | The entity ID of the chore or chores to offset the due date of. |
| `offset` | Required | The number of days to offset the due date by. This can be positive or negative. |
| `date` | Optional | The date of the chore to offset, or the next due date if blank. |

### chore_helper.remove_date

This service can be called to remove a chore date (e.g. skip a chore). This removes the next due date if no date is passed. If a date is passed, it will remove the due date that matches the date passed. Even if no due date currently matches, the removal will persist so that if a due date is added that matches the date passed, it will be removed as well.

| Service Data Attribute | Optional | Description |
| ---------------------- | -------- | --------------------------------------------------------------- |
| `entity_id` | No | The entity ID of the chore or chores to add a due date to. |
| `date` | Yes | The date of the chore to remove, or the next due date if blank. |
| Service Data Attribute | Type | Description |
| :--------------------- | :------- | :-------------------------------------------------------------- |
| `entity_id` | Required | The entity ID of the chore or chores to add a due date to. |
| `date` | Optional | The date of the chore to remove, or the next due date if blank. |

### chore_helper.update_state

This service can be called to update the state of a chore. This is mainly useful for custom chores that don't automatically update themselves.

| Service Data Attribute | Type | Description |
| :--------------------- | :------- | :------------------------------------------------------------------------- |
| `entity_id` | Required | The entity ID of the chore or chores to update their state and attributes. |

## Contributions are welcome!

If you want to contribute to this please read the [Contribution guidelines](CONTRIBUTING.md)
Expand Down