diff --git a/docs/core/entity/calendar.md b/docs/core/entity/calendar.md index 544b4e0c..09f3b592 100644 --- a/docs/core/entity/calendar.md +++ b/docs/core/entity/calendar.md @@ -35,6 +35,7 @@ and are combined using the bitwise or (`|`) operator. | ------------------- | ------------------------------------------------------------------ | | `CREATE_EVENT` | Entity implements the methods to allow creation of events. | | `DELETE_EVENT` | Entity implements the methods to allow deletion of events. | +| `UPDATE_EVENT` | Entity implements the methods to allow update of events. | ## Methods @@ -92,6 +93,29 @@ class MyCalendar(CalendarEntity): """Delete an event on the calendar.""" ``` +### Update Events + +A calendar entity may support deleting events by specifying the `UPDATE_EVENT` supported feature. Integrations that support mutation must support rfc5545 recurring events. + +There are three ways that recurring events may be deleted: +- Specifying only the `uid` will update the entire series +- Specifying the `uid` and `recurrence_id` will update the specific event instance in the series +- Specifying `uid`, `recurrence_id`, and a `recurrence_range` value may update a range of events starting at `recurrence_id`. Currently rfc5545 allows the [range](https://www.rfc-editor.org/rfc/rfc5545#section-3.2.13) value of `THISANDFUTURE`. + +```python +class MyCalendar(CalendarEntity): + + async def async_update_event( + self, + uid: str, + event: dict[str, Any], + recurrence_id: str | None = None, + recurrence_range: str | None = None, + ) -> None: + """Delete an event on the calendar.""" +``` + + ## CalendarEvent A `CalendarEvent` represents an individual event on a calendar.