On_click: working as on_press:

I am using on_click:, as below, but it just operates as on_press:.

  - platform: gpio                              # Physical manual feed switch
      number: 17
      mode: INPUT_PULLUP
    name: "Manual Fish Feed"
    id: manual_fish_feed
      min_length: 1000ms
      max_length: 2000ms
        - script.execute: manual_dispense_food
        - delay: 1s
        - homeassistant.service:
            service: input_boolean.turn_off
              entity_id: input_boolean.manually_feed_fish

Am I using it incorrectly?

Did it work before? My understanding is that on_click is for binary sensors, it may not work with an input_boolean? Maybe try a binary template sensor for the input_boolean

Well, I seem to remember it working on another project but maybe my memory fails me.

I run a test with binary sensor and see.

Thank you for your help.

Just realised that I posted the wrong code above.

I’m trying to use it with GPIO, which I know is achievable.