In this particular case, I’m using an Xiamoi button and I’d like the single and double click to perform the same action without duplicating the code block.
Im not familiar with the click event, so I dont know if it would be “click_id”, or just click, or something else. I like this setup (once you get it figured out, because it’s easy to change in the future
For a click event w/ entity_id of binary_sensor.switch_lamp, what are the possible values for click_type? Specifically, are there more possibilities than single and double? If not, then just remove the click_type line from the trigger. Then it will trigger no matter what click_type is.
If there are other possible values, and you only want the automation action to run for single and double, then you’ll still need to remove click_type from the trigger, but you’ll also need to add a condition that checks that trigger.event.data.click_type is only single or double. E.g.: