Hi
First contribution from long-time lurker.
I have searched high and low for solutions to having shelly 1 and 2.5 wall switches in my walls for a guest-and-SO-friendly approach to lights.
We live in Denmark in an older, rented house, so options are limited. I have installed Shelly 1 and 2.5 switches behind the rocker switches in the walls flashed with ESPhome. I was annoyed that the contacts weren’t consistently up or down dependent on light on/off status, so I converted them to spring loaded click switches. Now I had the possibility of using multi click actions.
In ESPhome-devices.io, there is an example for this use case using HomeAssistant.events. Could not get that to work.
Found an example of implementing a text_sensor in stead (https://gist.github.com/albertnis/f33066b0b3623a9839a3429c8f19f4d4). I modified this and added a blueprint for easy configuration of automations for each action.
Long story short:
EPShome configuration example: https://gist.github.com/agdamsbo/819c27a5b986c38327d4b19057cbfb6d
Accompanying blueprint: https://gist.github.com/agdamsbo/f49277bd8dd9bbada055c49600bea9e2
Feel free to use and copy, and thank you for feedback.