Double click a switch, toggle another

Hi,

I have a Shelly 2.5 connected with MQTT to my HA as a light entity. I was wondering if I could somehow make it so when I double click one of the switches it toggles the switch on my Shelly 1PM Plus?

Is double click an option on the device?
If not then use the history stats integration to count the on/off clicks of the device then you this count as the trigger on an automation.

Alternatively set up an automation to trigger when you do a state change, then action is wait for trigger and wait for the state to change, that would be a double click

Hi!

Just last week I was implementing something similar with a shelly plus 1 and a zigbee switch, when I click on the wall switch a floor lamp turns on and when I click twice the ceiling light turns on.

After a lot of searching on the internet and trying various options, I have made an implementation that I think works quite well for me (my girlfriend liked it!!)

Part is implemented with ESPhome and another part with Node-Red.
With the “on_multi_click” option of ESPHome my problem is that I think it is more designed for pushbuttons than for switches, or at least I have not been able to understand the timing… Whenever it enters the double click, it also executes the single click, for which I have done a filter with Node Red (with “wait until” node) :slight_smile: .

If you want I put the code and the flow of Node-Red.

Donno about vanilla Shelly devices but you can do this with ESPHome-programmed ones.