Seeking Alternatives to using a time pattern trigger in automations

I have an automation that decrements an input number (Dynamic Timer) that can be updated by Alexa (Actionable Notifications) and motion detectors. Currently there are five automation integrated to control the basement lights. (Automation is necessary because there are many lights on the same circuit, prior to HA automation, the traditional timers could leave you trapped in the darkness looking for the switch.) Automation(s): basement_lights_triggers.yaml turns on the lights and sets the timer. basement_lights_timer.yaml decrements the value by one every minute. And finally, basement_lights_timeout.yaml turns the lights off when the timer reaches zero. Alexa (Actionable Notifications) and movement detectors also dynamically increase or decrease the timer value as needed. As my post indicated, the time pattern used is firing every minute instead of the ten times daily. I will confess, when written, I thought that an ‘and’ condition was possible in the trigger. Does anyone have any suggestions / experience that could move the time pattern condition out of the trigger section of the automation?

alias: basement_lights_timer
id: basement_lights_timer
description: Basement Light Timer
trigger:
  - platform: time_pattern
    minutes: "*"
  - platform: numeric_state
    entity_id: input_number.timer_basement
    above: 0
condition:
  - condition: numeric_state
    entity_id: input_number.timer_basement
    above: 0
action:
  - choose:
    - conditions:
      - condition: state
        entity_id: switch.basement_lights
        state: 'on'
      sequence:
        - service: input_number.decrement
          entity_id: input_number.timer_basement
  - choose:
    - conditions:
      - condition: state
        entity_id: switch.basement_lights
        state: 'off'
      sequence:
      - service: input_number.set_value
        data:
          value: 0
        target:
          entity_id: input_number.timer_basement
mode: single

Why not use a proper timer?
There are helpers that can countdown by themselves.

This:

  - platform: state
    entity_id: input_number.timer_basement
    to: ~

will trigger when the state of that input_number changes.

@Hellis81,
Thank you for the read. Traditional timers are … ah … traditional. Life isn’t. Traditionally, my wife or I goes in or through the basement in less than 4 minutes. But get trapped if longer, because you can not modify a running traditional timer. But traditionally, before some sort of automation, those lights were left on for hours, if not days.I now consider myself a novice at HA, so this is my 5th and closest attempt (Which actually works quite well). My only concern was the constant triggered in HA, although if necessary safety first. My thoughts were to share it with the experts in Community, and everyone as a whole could be one step smarter (L love the idea of sharing wisdom). Thanks again for taking the time.

@Tinkerer,
Excellent!!! I will try it. I must admit, it looks like a perfect solution (and one that I would have never found simply by trial and error). Excitingly, I take my flashlight and iPad to the basement to test it! :cowboy_hat_face:

@Tinkerer,
So close. the result is that the dynamic timer is decremented and the timer remains idle. So…
I made two additional changes completing the latest Working revision. first was inspired by @Hellis81 and relocated the timer function to the sequence as a one minute delay. The second was to change the mode of the automation to restart.
Once again, Thank You both. Everything is better when you can brainstorm ideas amongst friends.

Well, what I posted works for the entity you provided. I never said it’d work for a timer - but the docs for the timer explain how it works.