Google Calendar Offset Question

Hi all, I just got a quick question.

Im trying to use google calendar to trigger a automation

my calendar config is as follows.

- cal_id: [email protected]
  entities:
  - device_id: nfl_season_calendar_usa__cleveland_browns
    ignore_availability: true
    name: NFL Season Calendar (USA) - Cleveland Browns
    default_offset: "!!-15"
    track: true

and my automation:

- id: browns_football_cbs
  alias: Browns Football CBS
  trigger:
    platform: state
    entity_id: sensor.browns_off_set
    to: 'true'
  condition:
    condition: state
    entity_id: 'sensor.channel_name_manual'
    state: 'CBS'
  action:
    - service: script.turn_on
      entity_id: script.cbs

I have been playing around with the offset and couldn’t get it to change to true. the way its setup now it should trigger 15 minutes before the event starts, correct?

Do you see anything wrong here?

Thanks for any guidance you can provide.

Corey

in your calendar config it should be:

- cal_id: [email protected]
  entities:
  - device_id: nfl_season_calendar_usa__cleveland_browns
    ignore_availability: true
    name: NFL Season Calendar (USA) - Cleveland Browns
    offset: "!!"
    track: true

and then in the actual google calendar entry, you add the following to the title:

NFL Season Calendar (USA) - Cleveland Browns !!-15

(where the !!-15 is your requested 15min offset)

Then once the time is 15mins prior to the event, the offset will become ‘true’.

2 Likes

Thank you, makes perfect sense! I really appreciate it!

I can’t seem to get this to work for some reason.

- cal_id: [email protected]
  entities:
  - device_id: nfl_season_calendar_usa__cleveland_browns
    ignore_availability: true
    name: NFL Season Calendar (USA) - Cleveland Browns !!-55
    offset: "!!"
    track: true

- id: browns_football_cbs
  alias: Browns Football CBS
  trigger:
    platform: state
    entity_id: calendar.nfl_season_calendar_usa__cleveland_browns
    to: 'on'
  condition:
    condition: state
    entity_id: 'sensor.channel_name_manual'
    state: 'CBS'
  action:
    - service: script.turn_on
      entity_id: script.cbs

Is this correct?

Also will this : calendar.nfl_season_calendar_usa__cleveland_browns off << change to ‘on’ when off_set is reached?

don’t put the !!-55 in you yaml code for the name: entry, only include the !!-55 in the actual google calendar entry (ie: on your phone or whatever you use to create the calendar event)

1 Like