Conditional wait depending on trigger id?

I have an automation which executes a script when triggered. If the trigger id is set to a certain value I’d like to wait 10 seconds before executing the script. I’ve tried the syntax below, but it seems to add a 10 second delay regardless of the trigger id.
What’s the correct way of doing this?

action:
  - wait_template: "{{ is_state('trigger.id', 'hall_generic_camera') }}"
    timeout: 10
    continue_on_timeout: true
  - service: script.send_camera_snapshot
    data:
      camera_id: "{{ trigger.id }}"

My understanding of the above is that this wait template will simply wait for the trigger ID to be true for up to 10 seconds, therefore it is not a delay its a wait if not already true.

Note sure what the rest of the automation is but I would probably do something like this:

action:
  - if:
      - condition: trigger
        id: "hall_generic_camera"
    then:
      - delay:
          seconds: 10
      - service: script.send_camera_snapshot
        data:
          camera_id: "{{ trigger.id }}"

Thanks for that. In your example, will execution of the script always be delayed by 10 seconds? (I’m not sure where the if statement logically terminates).
Edit…I’ve just tried it, and for some reason the script didn’t get executed at all. There’s no error in the log, so not sure why???

If the trigger ID is hall_generic_camera then yes the script will always be delayed by 10 seconds.

The IF statement terminates based on your indentation, so if you carry on the same indentation everything on that same indentation becomes part of the IF statement. If you drop back indentation then its part of the main automation and not the IF statement - if that makes sense.

action:
  - if:
      - condition: trigger
        id: "hall_generic_camera"
    then:
      - delay:
          seconds: 10
      - service: script.send_camera_snapshot
        data:
          camera_id: "{{ trigger.id }}"
    # - you can add further actions here if you wish
    #   that will only action if the IF statement is true.
# - anything added here is not part of the IF statement 

I am not 100%, I wonder if the trigger ID was not passed, however logically if staying with the IF statement you might as well change it to the following example as using the trigger ID for the camera ID serves no real purpose on this section as its only ever going to be hall_generic_camera by the nature of the IF statement:

action:
  - if:
      - condition: trigger
        id: "hall_generic_camera"
    then:
      - delay:
          seconds: 10
      - service: script.send_camera_snapshot
        data:
          camera_id: "hall_generic_camera"

Maybe, give it a try I guess.