Mainly based on the hard work of @vandalon
Choose carefully the version according to your needs
A new version for the PTM21xZ/ZE family is available here.
In order to get full functionality, a basic text helper must be created. The helper is mainly used to store the last commands and simulate a hold
/ release
action. This is a need as this device always send a release
command whatever which button is pressed. (press_1 → release, press_2 → release, …)
Home Assistant must run version 2024.10.x minimum in order to use those blueprints.
Tested on Z2M versions 1.x and 2.x.
UPDATE
2025.04:
A new version is now available HERE
. Any PTM21xZ/ZE is supported as well as the
multiple controller
in the blueprint.
HOW TO UPGRADE
- Import the new blueprint
- Open your automation based on the older version
2.1 Edit inYAML
PTM215Z/ZE
2.2.1. Update line 4 from path:path: Chris/PTM_215Z_ZE.yaml
to path:path: Chris/PTM_21xZ_ZE.yaml
PTM216Z
2.2.2. Update line 4 from path:path: Chris/PTM_216Z.yaml
to path:path: Chris/PTM_21xZ_ZE.yaml
DOWNLOAD (Older version)
Standard version:
Second version (v2):
elapsed has to be enabled in Zigbee2mqtt. Go to Settings → Advanced
EXAMPLES
Here, some examples how to use those blueprints especially for the dimming commands.
Work in both versions:
button_1_held:
- action: mqtt.publish
data:
qos: "0"
retain: false
topic: zigbee2mqtt/friendly_name/set
payload: "{\"brightness_move\": 50}"
enabled: true
button_1_released:
- action: mqtt.publish
data:
qos: "0"
retain: false
topic: zigbee2mqtt/friendly_name/set
payload: "{\"brightness_move\": \"stop\"}"
enabled: true
Work in v2 only:
button_1_held:
- repeat:
count: 15
sequence:
- action: light.turn_on
metadata: {}
data:
brightness_step: -25
transition: 1
target:
entity_id: light.my_light
- delay:
milliseconds: 500