ESPhome release button action?

Hi, i’m trying to get dimming to work for my esphome bulbs
I have a node red flow that picks up the hold/long button press that would either dimming up/down using trigger node.
However I still another payload particularly ‘release button’ that would reset the trigger node.
Is there an example for esphome button release? I’ve only seen single, double, triple and hold clicks example on the esphome webpage

on_release ?

1 Like

Thanks, looks like that’s what i need
How do have it only output the ‘release’ action after the ‘long click’ action?

    #double click
    - timing:
        - ON for at most 1s
        - OFF for at most 1s
        - ON for at most 1s
        - OFF for at least 0.2s
      then:
        - if:
            condition:
              and:
                - wifi.connected:
                - api.connected:
            # send double click event in case wifi and api are conncected
            then:
              - logger.log: "Double Click"
              - homeassistant.event:
                  event: esphome.button_pressed
                  data:
                    title: Button 1 double click
            # toggle relay in case either wifi or api are not connected
            else:
              - switch.toggle: "relay_1"
      # long click
    - timing:
        - ON for at least 1.5s
      then:
        - if:
            condition:
              and:
                - wifi.connected:
                - api.connected:
            # send long click event in case wifi and api are conncected
            then:
              - logger.log: "Long Click"
              - homeassistant.event:
                  event: esphome.button_pressed
                  data:
                    title: Button 1 long click
            # toggle relay in case either wifi or api are not connected
            else:
              - switch.toggle: "relay_1"
    on_release:
      then:
        - logger.log: "Release"
        - homeassistant.event:
            event: esphome.button_pressed
            data:
              title: Button 1 release

Probably “on for at least 1s, off for at least 0.1s”

So multiclick rather than on release.

1 Like

Thanks! Don’t quite understand multiclick with on and off just yet but that works for me

1 Like