Google calendar no sensors created

After setting up Google calendar I got a calendar.xxxx as a device and I can see the upcoming events …
Now I want to add some extra sensors to trigger some events but the extra sensors are not generated. Or am I doing something wrong…

this is my google_calendar.yaml

- cal_id: xxxxx
  entities:
  - device_id: xxxxx
    name: calendar
    track: true
  - device_id: vcgrijs
    name: Vuilcontainer grijs
    track: true
    search: grijze_bak
    all_day: true
  - device_id: vcgroen
    name: Vuilcontainer groen
    track: true
    search: groene_bak
    all_day: true

- cal_id: '#[email protected]'
  entities:
  - device_id: contacts
    name: Contacts
    track: true

- cal_id: nl.dutch#[email protected]
  entities:
  - device_id: feestdagen_in_nederland
    name: Feestdagen in Nederland
    track: true

Update:

It’s giving me an error :
2017-10-25 17:23:32 WARNING (SyncWorker_3) [homeassistant.components.google] Calendar Invalid Data: extra keys not allowed @ data['entities'][1]['all_day']

And after each restart of HA the main cal id is added to google_calendars.yaml again

seems like it that my created google_calendars.yaml is not correct ? How to add the sensors then ?

What sensor are you trying to create? The calendar state is on if the event is currently started and off when there are no events occurring. The calendar also has these state attributes which can be accessed without having to be created.

I use the start_time state attribute to create a sensor of the seconds till the next event start time.

  - platform: template
    sensors:
      timetoleavesec:
        entity_id: sensor.time
        value_template: >-
          {{(as_timestamp(states.calendar.calendar.attributes.start_time) - as_timestamp(now())) }}

Ok, but how to let the state change only on a specific event in my calendar ?
Thats where the search is for ? or not ?

my mistake :blush:
The value all_day : true is not something to set in the google_cal.yaml file but is a state from the sensors

The google calendar component only changes state when the next event changes. I don’t know of a way to search for events.

So why there is a search option to set ?

In my opinion: set the search option to the name of the event in your Google calendar ( example : kids at home) . That will set the calendar.kids at state on…

Or am I wrong ?

The only thing I want to do is switch that calendar to on or off based on a SPECIFIC event

Oh, I see where you are looking. I actually don’t use that part of the google calendar because I think it is unnecessary. I believe that part of the configuration will look at the next event and if it matches the search: it will create a sensor for automation. I don’t think it will for example search for xmas and report back Dec 25th unless xmas is the next event but I could be wrong.

I do the same by using automation to look at the next event and if it matches a trigger, I do something using start_time etc.