Mainly based on the hard work of @vandalon
Even if they are quite close, this blueprint works with PTM216Z only.
A working version for the PTM215Z/ZE can be found here.
In order to get full functionality, a text helper must be created and the “elapsed” function must be enabled in Zigbee2MQTT as well. The helper is mainly used to create a long press action
.
This blueprint works on both Z2M version 1.x or 2.x.
UPDATE
2024.10 :
The blueprint has been updated and there is no need anymore to use the elapsed
function.
The latest syntax has been used which implies that Homeassistant must run version 2024.10.x minimum.