mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-16 13:56:53 +00:00
Improve caldav documentation
This commit is contained in:
parent
97ba35ef5d
commit
90cf4205cc
@ -33,9 +33,38 @@ To integrate a WebDav calendar in Home Assistant, add the following section to y
|
|||||||
# Example configuration.yaml entry
|
# Example configuration.yaml entry
|
||||||
calendar:
|
calendar:
|
||||||
- platform: caldav
|
- platform: caldav
|
||||||
|
username: john.doe@test.com
|
||||||
|
password: !secret caldav
|
||||||
url: https://baikal.my-server.net/cal.php/calendars/john.doe@test.com/default
|
url: https://baikal.my-server.net/cal.php/calendars/john.doe@test.com/default
|
||||||
```
|
```
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
|
||||||
|
### {% linkable_title Custom calendars %}
|
||||||
|
|
||||||
|
You have the possibility to create multiple binary sensors for events that match certain conditions.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
# Example configuration.yaml entry
|
||||||
|
calendar:
|
||||||
|
- platform: caldav
|
||||||
|
username: john.doe@test.com
|
||||||
|
password: !secret caldav
|
||||||
|
url: https://baikal.my-server.net/cal.php/calendars/john.doe@test.com/default
|
||||||
|
custom_calendars:
|
||||||
|
- name: 'HomeOffice'
|
||||||
|
calendar: 'Agenda'
|
||||||
|
search: 'HomeOffice'
|
||||||
|
- name: 'WarmupFlat'
|
||||||
|
calendar: 'Agenda'
|
||||||
|
search: 'Warmup'
|
||||||
|
```
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
Please note that when you configure custom calendars, the default ones are not created anymore.
|
||||||
|
|
||||||
{% configuration %}
|
{% configuration %}
|
||||||
url:
|
url:
|
||||||
required: true
|
required: true
|
||||||
@ -68,7 +97,7 @@ custom_calendars:
|
|||||||
type: string
|
type: string
|
||||||
search:
|
search:
|
||||||
required: true
|
required: true
|
||||||
pending_charges: Regular expression for filtering the events
|
pending_charges: Regular expression for filtering the events based on the content of their summary, description or location.
|
||||||
type: string
|
type: string
|
||||||
{% endconfiguration %}
|
{% endconfiguration %}
|
||||||
|
|
||||||
@ -82,18 +111,3 @@ custom_calendars:
|
|||||||
- **location**: The event Location.
|
- **location**: The event Location.
|
||||||
- **start_time**: Start time of event.
|
- **start_time**: Start time of event.
|
||||||
- **end_time**: End time of event.
|
- **end_time**: End time of event.
|
||||||
|
|
||||||
### {% linkable_title Sensor attributes %}
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
# Example configuration.yaml entry
|
|
||||||
calendar:
|
|
||||||
- platform: caldav
|
|
||||||
url: https://baikal.my-server.net/cal.php/calendars/john.doe@test.com/default
|
|
||||||
username: john.doe@test.com
|
|
||||||
password: !secret caldav
|
|
||||||
custom_calendars:
|
|
||||||
- name: 'HomeOffice'
|
|
||||||
calendar: 'Agenda'
|
|
||||||
search: 'HomeOffice'
|
|
||||||
```
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user