My Google Calendar Integration

In the example it shows some scripting that I’ve not seen before…
For the cal_id its showing “*****@group.calendar.google.com” - added by the tool not me
What is that?

In the file generated by the integration it added…
Capture1

I’ve added the second group trying to mimic the first image but obviously NOT using the group designation.
BTW the documentation says NOT to alter this so I left the “[email protected]

In my entities I’m only seeing one entity… the second is not found

It’s auto-generated. You don’t have to modify it if you don’t want to change it. And as for what it is, did you read the docs?

Yep read the doc’s… but the docs are nebulous … Yep read that… but as you notice… what was auto generated for me is remarkably different from the doc’s example… thus… my questions!

Just like there is no mention that it will add a line to my HA menu bar … Its been my experience the doc’s are an Ok guide… but sometimes their not quiet “current”

I believe you can only have 1 entry with the same cal_id.

Have you tried something like that?

- cal_id: "[email protected]"
  entities:
    - device_id: aarons_calendar
      ignore_availability: true
      name: Aaron's Calendar
      track: true
    - device_id: aarons_calendar_important
      ignore_availability: true
      search: "#Important"
      name: Calednar important Events
      track: true
      offset: "!!"
1 Like

That’s what I thought too… but the documentation shows different. Your script make more sense to me as well… multiple entities all under the same cal_id.

I tried that… and it worked… but the calendar when opened from the menu would not show "filtered’ events…

Tell me whats the significance of the “#” in front of the search string value? Can it be omitted?

Basically it finds all things that have the string “#Important” in their name or description. Here’s mine:

- cal_id: **@group.calendar.google.com
  entities:
  - device_id: test
    ignore_availability: true
    name: Test
    track: false

- cal_id: **@gmail.com
  entities:
  - device_id: family_times
    ignore_availability: true
    name: Family Times
    search: "#Family"
    track: true
    max_results: 250
  - device_id: busy_times
    ignore_availability: true
    search: "#Busy"
    name: Busy Times
    track: true
    max_results: 500
  - device_id: reading_pages
    ignore_availability: true
    search: "#Read"
    name: Reading Pages
    track: true
    max_results: 20
- cal_id: addressbook#[email protected]
  entities:
  - device_id: contacts
    ignore_availability: true
    name: Contacts
    track: false

- cal_id: en.usa#[email protected]
  entities:
  - device_id: holidays_in_united_states
    ignore_availability: true
    name: Holidays in United States
    track: false

I just put “#Busy” in the title if I’m busy then.

It adds a menu bar for all types of calendar integrations, not just Google.

Explanation:

Thing Description
device_id entity id
name Friendly name
track Don’t create entity by setting to false
search Only return events that contain the search term
offset You can make events trigger early. Example: Hello !!-10 would trigger 10 minutes early if your offset was !!
ignore_availability Only be on when event is marked as busy
max_results On the calendar, show up to this number of upcoming events

So the ‘#’ is literal… its not a de-referencing symbol… search is looking for ‘#Important’ not just the word ‘Important’… i.e so ‘#Important Meeting’ is found… but ‘Important Trip’ is ignored

Yes, if you just do Important instead of #Important it would match.

Thanks… I’ve got the idea now… I read documentation for a living (software engineer) so I’ve learned that good documentation leaves NOTHING up to interpretation… HA… sometimes falls a bit short of that mark

Well if it isn’t good, you can always edit it on GitHub!

1 Like

I guess… but in my world its the developers’ (and his/her team if there is one) responsibility to make sure… That’s most likely why the example in the doc’s now are wrong withe respect to the entity list… the developer would / should know…

Anyway thanks for your help and insight!

HA is community-powered. There are some frequent contributors, which some might call a developer team, but anyone can be a helper.

I know… I’ve been here about a year now… I’t’s just sometimes!!! LOL
The struggle is real… Thanks again for your help…Oh BTW I got it working…

1 Like

An interesting artifact is being displayed… I have multiple echos in the house.

I’m trying to trigger an automation event from the calendar to a specific echo… the one in my office…which works…

  1. Raise the volume to full… which works
  2. Make an announcement… which works
  3. Lower the volume back down to 50%… which works

But… just before that sequence… it fires an unsolicited announcement to the echo in the family room … announcing that a reminder will be delivered in one minute… which was the offset on both the calendar event in HA and on the event in Google…

Can’t explain why the family room (default echo ?)… and not the one the automation is pointing at and why I’m getting a reminder about the upcoming event…

And of course… this behavior is NOT in the documentation LOL! Its kinda cool… but unexpected… Ahhhh HA … gotta love it!

and I discovered that I cant spell “Calendar”

- id: test_reminder
  alias: Testing Reminder
  description: Google Calendar Reminder Event
  trigger:
  - entity_id: calendar.homeassistant
    platform: state
    to: 'on'
  condition:
  - condition: template
    value_template: '{{is_state_attr(''calendar.homeassistant'', ''description'',''Test'')}}'
  action:
  - data:
      volume_level: 1
    entity_id: media_player.office_echo
    service: media_player.volume_set
  - data:
      data:
        type: announce
      message: This is a reminder. Today I'm testing the response.
      target: media_player.office_echo
    service: notify.alexa_media
  - data:
      volume_level: 0.5
    entity_id: media_player.office_echo
    service: media_player.volume_set
  mode: single
1 Like

What exactly is it saying about the upcoming stuff? That shouldn’t be happening.

Its saying “Name Of Calendar Event” will start in 1 min … says that 2 times then the automation runs and makes the configured announcement on the correct echo…

Strange Huh?

I have discovered a couple of things…

As an aside… I found this gents site…
Alexa Media Player

If you turn off the automation, does it still say that?

Been outta pocket for a bit… anyway I discovered why it was announcing on my family room echo… in the Alexa app on my PHONE… under calendars its configured to announce there… I cant change it… thats another problem but at least I know why now…

Its still announcing that an event is about to happen… but I suspect that in the app someplace too!