Clarify duration/end_date_time usage (#29790)

* Make it slightly clearer that duration and end_date_time are mutually exclusive.

* Add note that either duration or end_date_time must be specified

- see comment in #29787
- https://github.com/home-assistant/core/blob/dev/homeassistant/components/calendar/__init__.py#L266-L267

* fix typo

---------

Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
This commit is contained in:
Fletcher 2023-11-14 16:54:51 +08:00 committed by GitHub
parent 78f890b7b0
commit eef183c08e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -200,8 +200,8 @@ with calendar events within a date range.
| Service data attribute | Optional | Description | Example |
| ---------------------- | -------- | ----------- | --------|
| `start_date_time` | yes | Return active events after this time (exclusive). When not set, defaults to now. | 2019-03-10 20:00:00
| `end_date_time` | yes | Return active events before this time (exclusive). Cannot be used with 'duration'. | 2019-03-10 23:00:00
| `duration` | yes | Return active events from start_date_time until the specified duration. | `days: 2`
| `end_date_time` | yes | Return active events before this time (exclusive). Cannot be used with `duration`. You must specify either `end_date_time` or `duration`.| 2019-03-10 23:00:00
| `duration` | yes | Return active events from `start_date_time` until the specified duration. Cannot be used with `end_date_time`. You must specify either `duration` or `end_date_time`. | `days: 2`
<div class='note'>