"Event length" as a condition attribute for a Google Calander trigger

I’m trying to trigger an automation using the google calendar integration, but I want to only trigger the automation at the start of events that are over 3 hours long.

I live in South Africa where we have load-shedding (power cuts) and I want to turn off certain appliances at the start of long outages. We have a reasonably reliable calendar that I can use, and have it synced with Google Calander. I don’t want to turn off the appliances on a short load-shedding event (2.5 hours) only at the beginning of the really long ones (4.5 hours) because my power backup does not last 4.5 hours with everything plugged in.

Is there a way to use a condition of “length” of the event?
Is there a work around that I have missed?

Thanks.

condition:
  - condition: template
    value_template: >
      {{ trigger.calendar_event.end | as_datetime  -
      trigger.calendar_event.start | as_datetime >= timedelta(hours=3) }}

Thanks, @Didgeridrew. It looks like this works!
Im going to let if run for a bit to see.
Thanks so much.