Based on the blueprint of Profile - vandalon - Home Assistant CommunityZigbee2MQTT enOcean PTM 215Z (Friends of Hue) switch, the functionality has been extended. It is now possible to create a loop by holding down a button with a variable delay time, which allows, for example, the brightness of a lamp to be increased or decreased.
Requires an input_text entity to track held state. Create an input_text entity (e.g., input_text.switch_held_state) and set its initial value to “none”.
Important:
Don’t forget to activate “elapsed” in z2m under settings → advanced. Otherwise the blueprint doesn’t work!
Looks good but I don’t get it to work. When I press a button, I can see the change in the input_text entity. But the shelly or the other plugs wont do anything.
Yes, I did set it to none. Like I said, the text changes when I press the butto but nothing happens. I have to say, I m new to z2m, I just moved my stuff from a hue bridge. I am also no expert when it comes to mqtt.