Skip to content

Commit 91cdfa0

Browse files
authored
Merge pull request home-assistant#4899 from maxlaverse/improve_caldav_documentation
Improve caldav documentation
2 parents 518a87d + 90cf420 commit 91cdfa0

File tree

1 file changed

+30
-16
lines changed

1 file changed

+30
-16
lines changed

source/_components/calendar.caldav.markdown

+30-16
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,38 @@ To integrate a WebDav calendar in Home Assistant, add the following section to y
3333
# Example configuration.yaml entry
3434
calendar:
3535
- platform: caldav
36+
37+
password: !secret caldav
3638
url: https://baikal.my-server.net/cal.php/calendars/[email protected]/default
3739
```
3840
41+
This example will generate default binary sensors for each calendar you have in your account. Those calendars will be `on` when there is an ongoing event and `off` if not. Events that last a whole day are ignored in those calendars. You have to setup custom calendars in order to take them into account or for advanced event filtering.
42+
43+
44+
### {% linkable_title Custom calendars %}
45+
46+
You have the possibility to create multiple binary sensors for events that match certain conditions.
47+
48+
```yaml
49+
# Example configuration.yaml entry
50+
calendar:
51+
- platform: caldav
52+
53+
password: !secret caldav
54+
url: https://baikal.my-server.net/cal.php/calendars/[email protected]/default
55+
custom_calendars:
56+
- name: 'HomeOffice'
57+
calendar: 'Agenda'
58+
search: 'HomeOffice'
59+
- name: 'WarmupFlat'
60+
calendar: 'Agenda'
61+
search: 'Warmup'
62+
```
63+
64+
This will create two binary sensors for the calendar name Agenda: "HomeOffice" and "WarmupFlat". Those sensors will be `on` if there is an ongoing event matching the regular expression specified in `search`. In custom calendars, events that last a whole day are taken into account.
65+
66+
Please note that when you configure custom calendars, the default ones are not created anymore.
67+
3968
{% configuration %}
4069
url:
4170
required: true
@@ -68,7 +97,7 @@ custom_calendars:
6897
type: string
6998
search:
7099
required: true
71-
pending_charges: Regular expression for filtering the events
100+
pending_charges: Regular expression for filtering the events based on the content of their summary, description or location.
72101
type: string
73102
{% endconfiguration %}
74103

@@ -82,18 +111,3 @@ custom_calendars:
82111
- **location**: The event Location.
83112
- **start_time**: Start time of event.
84113
- **end_time**: End time of event.
85-
86-
### {% linkable_title Sensor attributes %}
87-
88-
```yaml
89-
# Example configuration.yaml entry
90-
calendar:
91-
- platform: caldav
92-
url: https://baikal.my-server.net/cal.php/calendars/[email protected]/default
93-
94-
password: !secret caldav
95-
custom_calendars:
96-
- name: 'HomeOffice'
97-
calendar: 'Agenda'
98-
search: 'HomeOffice'
99-
```

0 commit comments

Comments
 (0)