Hello fedot,
Thank you for this awesome hint.
It works with every of the four buttons.
But it always fires twice, there are always two button_pressed events in the list.
If i go into debugging, there is only one command.
Can you help me to solve this last issue?
Best Regards,
Dominik
Correct. You have to specify pushed: 1 for the button press or pushed: 0 for the button release
You could do some stuff with that, i.e. fire a script on pushed: 1 and have a wait template for the pushed: 0 event, so you could have “hold button” effects
But there where two identical button_pressed events.
I had a look in my configuration.yaml and saw there where two binary sensors for that switch, that caused the problem.
After deleting one, i only got one button pressed event.