First, please follow Question Guideline #11 and share your automation configuration as properly formatted text and not an image.
How Do I do that?
You can access it by clicking the 3-dot expansion menu button at the top right in the automation editor and choose “Edit in YAML”. Then, select and copy everything from the YAML editor. Paste the copied text into your post.
Be sure to format it properly by adding 3 back-ticks (```
) on the lines above and below the pasted configuration
https://community.home-assistant.io/t/how-to-format-your-code-in-forum-posts/702762
If your button doesn’t natively support multi-press events then you will have to emulate them by using a Wait for Trigger action in your automation.
In general this would look like:
triggers:
- trigger: state
entity_id: sensor.x
to: y
conditions: []
actions:
- wait_for_trigger:
- platform: state
entity_id: sensor.x
to: y
timeout:
seconds: 2
continue_on_timeout: true
- choose:
- conditions:
- condition: template
value_template: "{{ wait.trigger is none }}"
sequence:
- #ACTIONS FOR SINGLE PRESS
default:
- #ACTIONS FOR DOUBLE PRESS