Activate automation from calender event in automation

Hello all.

I’m trying to automate the activation of an automation depending on a event in 2 of my Google calendars that i have integrated.

This is my automation so far

alias: aktiver Wake light
description: ''
trigger:
  - platform: time
    at: '19:40'
condition:
  - condition: or
    conditions:
      - condition: state
        entity_id: calendar.beskaeftigelse
        state: arbejde
        attribute: message
      - condition: state
        entity_id: calendar.samvaer
        state: samvær
        attribute: message
  - condition: time
    weekday:
      - mon
      - tue
      - wed
      - thu
      - fri
      - sat
      - sun
action:
  - service: automation.turn_on
    target:
      entity_id: automation.wake_up_light_alarm_with_sunrise_effect
mode: single

The thing is i can’t get it to trigger.
But if i run it manually it activates the wake light automation as intended.
So i think my problem lay in the trigger or condition somewhere…

Is there a way to correct it so it will work as intended?

Have you checked the debug to see if it’s been triggered at time and at what point it failed?

Also why do you have a time condition that simply lists every day of the week anyway?

Also have to checked the state of the two calendar binary sensors to confirm they show the state and message required for the conditions?

It does trigger.
But with a error with a condition not working.

I have the all the days on at the moment for testing.

The calander sensor is working and are showing the message that i have set as a search word.

Found the problem.

The message is case sentitiv.
So in my calendar it was with high case first letter and my code used lower case.

After changing from lower case to higher case it run from start to finish and it did it’s task as intended.

Good find, I had much the same when setting up the calendar binary sensors, entered several test events via iOS calendar app not noting that the iPhone was auto capitalising all the entries.

Glad you sorted it

It’s a pain in the buttom…

But now i hopefully I’m more aware of the detail later on.