Skip to content

Commit

Permalink
Deprecate service list_events in favor of get_events
Browse files Browse the repository at this point in the history
- The service `calendar.list_events` is deprecated in favor or `calendar.get_events`
- in 2023.12. Scheduled to be removed in 2024.6
- This PR adds a note that this service is deprecated
- The docs for `get_events` are a topic for a separate PR
- Unlike list_events, get_events supports multiple responses
- related parent PR in core: home-assistant/core#102481
  • Loading branch information
c0ffeeca7 committed Dec 7, 2023
1 parent ce17711 commit 60bad05
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 2 additions & 3 deletions source/_docs/scripts/service-calls.markdown
Expand Up @@ -133,13 +133,12 @@ Examples of service response data are upcoming calendar events for the next week

Templates can also be used for handling response data. The service call can specify
a `response_variable`. This is the [variable](/docs/scripts/#variables)
that contains the response data. You can define any name for your `response_variable`. This example calls a service and stores the response in
the variable called `agenda`.
that contains the response data. You can define any name for your `response_variable`. This example calls a service and stores the response in the variable called `agenda`.

{% raw %}

```yaml
service: calendar.list_events
service: calendar.get_events
target:
entity_id: calendar.school
data:
Expand Down
4 changes: 4 additions & 0 deletions source/_integrations/calendar.markdown
Expand Up @@ -194,6 +194,8 @@ data:

### Service `calendar.list_events`

This service has been **deprecated** in Home Assistant version 2023.12. It will be removed in June 2024. Please use `calendar.get_events` instead.

This service populates [Response Data](/docs/scripts/service-calls#use-templates-to-handle-response-data)
with calendar events within a date range.

Expand Down Expand Up @@ -249,3 +251,5 @@ data:
</p>
```
{% endraw %}


0 comments on commit 60bad05

Please sign in to comment.