Shelly 1: Detect Double Click

Hi,
I am trying to detect double click on my Shelly1 but code is not conform.
Can anybody help me?
I am Newbee and copied to from How to do single AND double click on a switch in automation

Depending on Single or Double Click, it should send a message
my Automation code is


alias: Test Shelly1 dbl click
description: ""
trigger:
  - platform: state
    entity_id:
      - binary_sensor.shelly1_112108_input
    from: "off"
    to: "on"
condition: []
action:
  - choose:
    - conditions:
      - condition: trigger
        id:
          - binary_sensor.shelly1_112108_input
    sequence:
      - wait_for_trigger:
          - platform: state
    entity_id:
      - binary_sensor.shelly1_112108_input
    from: "off"
    to: "on"
        timeout:
          hours: 0
          minutes: 0
          seconds: 1
          milliseconds: 0
        continue_on_timeout: true
    - if:
              - condition: template
                value_template: "{{  wait.trigger == none }}"
            then:
               <action:
      - service: script.1711026930013
        data:
          title: HA Shelly
          message: SINGLE CLICK
            else:
               action:
      - service: script.1711026930013
        data:
          title: HA Shelly
          message: DOUBLE CLICK
mode: single