Run automation every 2 hours between 10am and midnight, starting at 10am

Hi guys
Just had a hip replacement and I’m wanting to do a reminder on my show every 2 hours between 10am and midnight.
This seems to work but doesn’t start at 10am it starts from when I did the automation.
Is it a simple as adding a 10am time trigger?
Thanks

alias: "Do your exercises "
description: ""
trigger:
  - platform: time_pattern
    hours: "2"
  
    
  
 
condition:
  - condition: time
    after: "10:00:00"
    before: "00:00:00"
action:
  - service: notify.alexa_media_dave_s_echo_show
    data:
      message: Hey Dave, do your excercises
      data:
        type: tts
mode: single

Change your time_pattern hours to “/2” that should fix it. You want it to be anytime the current hour is divisible by 2. Your condition should keep it operating only during the correct hours.

1 Like

Thanks, I did know this but it completely went out of my head :grin::grin: