Am I repleating myself?

I created several automations for an event I participate in called 11 Day jumpstart. It has several components. During the 11 days every day from 9am to 6 pm it sets a 45 minute movement reminder, and a 1 hour water reminder.

The event is triggered by my calender which I lable as “Jumpstart Begins”, sets the initial counter value to 1.

I feel like there might be a more efficient way of doing this, and I might be repeating sections of code. I also created a schedule helper that should remind me to take my supplements every third day, but I haven’t implemented it yet.

here is my automation.yaml if anyone has any suggestions or comments I would greatly appreciate it:


- id: "1703887674915"
  alias: Trigger on 11 Day Jumpstart
  trigger:
    - platform: state
      entity_id: calendar.main
      to: "on"
  condition:
    - condition: template
      value_template:
        "{{ 'Jumpstart Begins' in state_attr('calendar.main', 'message')
        }}"
  action:
    - service: input_boolean.turn_on
      data: {}
      target:
        entity_id: input_boolean.jump_start
    - service: counter.set_value
      target:
        entity_id: counter.jumpstart_days
      data:
        value: 1
- id: "1703897474719"
  alias: Run Every hour Between 9AM and 6PM
  trigger:
    - platform: time
      at: 09:00:00
  action:
    - repeat:
        while:
          - condition: time
            before: "18:00:00"
        sequence:
          - service: timer.start
            data: {}
            target:
              entity_id: timer.water_timer
          - delay:
              minutes: 60

- id: "1719297474720"
  alias: "Water Intake Reminder"
  trigger:
    - platform: time_pattern
      hours: "/1"
      condition:
        - condition: state
          entity_id: counter.11_day_jumpstart
          state: "on" # Ensure the counter is active
      action:
        - service: notify.mobile_app_sm_n960u
          data:
            message: "Time to drink water!"
      mode: single

- id: "1719297474821"
  alias: "Get Up And Move Reminder"
  trigger:
    - platform: time_pattern
      hours: "/45"
      condition:
        - condition: state
          entity_id: counter.11_day_jumpstart
          state: "on" # Ensure the counter is active
      action:
        - service: notify.mobile_app_sm_n960u
          data:
            message: "Time to get up and MOVE!"
      mode: single