How to do automation based on (google) calendar

Hi,

I’ve a Google Calendar setup. It does work fine and I do see my events in the Calendar tab.

I did create a “Holiday” agenda, named calendar.holiday. I do see this value changing between ON and OFF.

But I would like to setup stuff the previous day for the next day. Like at 9PM, I would like to setup the next day(alarm, philips hue, …), because I usually put my phone in plane mode during the night and therefore it will ring even the automation tried to deactivated it.

I don’t know how to see if the next morning I should be in the work or in the holiday mode?

Hi

In an automation:

trigger: calendar
entity_id: calendar.holiday
event: start
offset: "-12:0:0" (or any time you desire)

Optionally check for a condition with:

{{ 'some_text' in trigger.calendar_event.summary }}

Finally create an android alarm (this is for Android):

action: notify.mobile_app_<your_device>
metadata: {}
data:
  message: command_activity
  data:
    ttl: 0
    priority: high
    intent_action: android.intent.action.SET_ALARM
    intent_extras: >-
      android.intent.extra.alarm.HOUR:<x>,android.intent.extra.alarm.MINUTES:<x>,android.intent.extra.alarm.MESSAGE:'Flurry
      opvangen',android.intent.extra.alarm.SKIP_UI:true

I do this for 2 different start times with a condtional action but I guess it can be done by 1 action & templates.

Hi @Nick4 !
Thanks for the answer, I’ve tried a bit with your implementation.
The only issue I get is due to my agenda:

I can have either:

  • One full day of holiday
  • One half day(morning or afternoon) of holiday

the issue is that when I’ve a holiday for the full day, I set it as “full day” in google calendar, and therefore, the automation starts at 12:00
But when I’ve only one half day, I set it just for the morning(Typically 07:00 to 12:00).

Therefore if I just set an offset of X hours, it will not at all trigger at the same time.

Isn’t there a way to check if tomorrow at 08:00, a meeting is present, no matter the hour of the current day?