Esphome and overrule timed operation

I have the script in the footer for dimming a fish tank.
But know i wan’t to be abble to overrule this process, even when it is started.

what i could do is make a virtual button, don’t know how but i figure that out by google.

one solution i’m thinking of is to make a and function, if time and not manual override then dim.
and do this every x minutes,

i googled for this, but couldn’t find how to make and function in a timed base script.

#Start sunset at 21:00
    - seconds: 0
      minutes: 0
      hours: 19
      then:
        - light.turn_on:
            id: aquarium
            brightness: 0.923
        - delay: 1min
        - light.turn_on:
            id: aquarium
            brightness: 0.819     
        - delay: 1min
        - light.turn_on:
            id: aquarium
            brightness: 0.715     
        - delay: 2min
        - light.turn_on:
            id: aquarium
            brightness: 0.612    
        - delay: 2min
        - light.turn_on:
            id: aquarium
            brightness: 0.508     
        - delay: 2min
        - light.turn_on:
            id: aquarium
            brightness: 0.404     
        - delay: 2min
        - light.turn_on:
            id: aquarium
            brightness: 0.300     
        - delay: 5min
        - light.turn_on:
            id: aquarium
            brightness: 0.2     
        - delay: 5min
        - light.turn_on:
            id: aquarium
            brightness: 0.192   
        - delay: 5min
        - light.turn_on:
            id: aquarium
            brightness: 0.188     
        - delay: 5min
        - light.turn_on:
            id: aquarium
            brightness: 0.184
        - delay: 5min
        - light.turn_on:
            id: aquarium
            brightness: 0.180    
        - delay: 5min
        - light.turn_on:
            id: aquarium
            brightness: 0.176    
        - delay: 5min
        - light.turn_on:
            id: aquarium
            brightness: 0.172     
        - delay: 2min
        - light.turn_on:
            id: aquarium
            brightness: 0.168     
        - delay: 2min
        - light.turn_on:
            id: aquarium
            brightness: 0.165     
        - delay: 1min
        - light.turn_on:
            id: aquarium
            brightness: 0.161     
        - delay: 1min
        - light.turn_on:
            id: aquarium
            brightness: 0.157   
        - delay: 1min
        - light.turn_on:
            id: aquarium
            brightness: 0