Automation double click

Hello people. I’m struggling to do an automation with double click on the switch, I have tried it in several ways but without success. Below is what I did. Would anyone have a tip or suggestion?

- alias:  double click
  trigger:
    platform: event
    event_type: click
    event_data:
      entity_id: binary_sensor.wireless_touch_switch
      click_type: double
  action:
    service: switch.toggle
    entity_id: switch.outside.lamp

Normally how I’ve seen it work is the switch needs to send a payload of type double click, not you doing two single clicks in succession. I’m not sure how that would work with a binary sensor or if doing it this way is even valid.

1 Like