Calendar events and triggers (heating)

Hello all. My wife uses the calendar to keep track of the work schedules of both of us (my schedule is the same every week, but hers differs day by day). She does this to keep track of when we need a babysitter etc.

I’ve been wanting to use her calender to fire on the heating in house. I do this as follows;

I work from 6am (heating triggers 1,5h before that and ends exactly at 6am) to 2pm (heating starts for the remainder of the day).

The problem here is when our work schedules overlap, my 6am trigger kills the heating, while my wife may only begin working at 2 pm, so she’s left home in the cold.

So basically what I want is when there are two events planned in that day (my work schedule and hers), that it knows to not turn off the heating at 6am.

Here is the YAML that kills the heating when someone leaves for work;

alias: Verwarmen uit start shift
description: “”
trigger:

  • platform: calendar
    event: start
    offset: “-0:0:0”
    entity_id: calendar.verwarming
    condition: []
    action:
  • device_id: 5ca6d8f0f4c55de8467b21961db41c5b
    domain: climate
    entity_id: ee178b800eb2b69843a78461b9adaf4f
    type: set_preset_mode
    preset_mode: eco
    mode: single

Hope it’s doable this way and that someone could help me figure this out. Thanks a lot!