From c69f3808b180b6525f80092003b69aed9808182c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isabella=20Gross=20Alstr=C3=B6m?= Date: Tue, 18 Jun 2019 02:00:48 +0200 Subject: [PATCH] Add docs for new google service (#9057) * Update google documention with new service https://github.com/home-assistant/home-assistant/pull/22473 * :pencil2: Tweaks --- source/_components/calendar.google.markdown | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/source/_components/calendar.google.markdown b/source/_components/calendar.google.markdown index 82502250b31..41405af7e3a 100644 --- a/source/_components/calendar.google.markdown +++ b/source/_components/calendar.google.markdown @@ -20,6 +20,7 @@ The sensors created can trigger based on any event on the calendar or only for matching events. When you first setup this component it will generate a new configuration file `google_calendars.yaml` that will contain information about all of the calendars you can see. +It also exposes a service to add an event to one of your Google Calendars. ## {% linkable_title Prerequisites %} @@ -174,6 +175,25 @@ Otherwise everything following the hash sign would be considered a YAML comment. - **start_time**: Start time of event. - **end_time**: End time of event. +### {% linkable_title Service `google.add_event` %} + +You can use the service `google.add_event` to create a new calendar event in a calendar. Calendar id's can be found in the file `google_calendars.yaml`. All dates and times are in your local time, the component gets your time zone from your `configuration.yaml` file. + +| Service data attribute | Optional | Description | Example | +| ---------------------- | -------- | ----------- | --------| +| `calendar_id` | no | The id of the calendar you want. | Your email +| `summary` | no | Acts as the title of the event. | Bowling +| `description` | yes | The description of the event. | Birthday bowling +| `start_date_time` | yes | The date and time the event should start. | 2019-03-10 20:00:00 +| `end_date_time` | yes | The date and time the event should end. | 2019-03-10 23:00:00 +| `start_date` | yes | The date the whole day event should start. | 2019-03-10 +| `end_date` | yes | The date the whole day event should end. | 2019-03-11 +| `in` | yes | Days or weeks that you want to create the event in. | "days": 2 + +

+You either use `start_date_time` and `end_date_time`, or `start_date` and `end_date`, or `in`. +

+ ## {% linkable_title Using calendar in automations %} A calendar can be used as an external scheduler for special events or reoccurring events instead of hardcoding them in automations.