Zigbee2MQTT - PTM216Z

Mainly based on the hard work of @vandalon

:warning:Choose carefully the version according to your needs :warning:

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 :arrow_forward: HERE :arrow_backward:. Any PTM21xZ/ZE is supported as well as the multiple controller in the blueprint.

HOW TO UPGRADE

  1. Import the new blueprint
  2. Open your automation based on the older version
    2.1 Edit in YAML
    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):

:warning: :warning: :warning:

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

Thank you very much for the blueprint. What is the required length for the text input helper?

The helper is just here to store the last command. It is used for the long press action as the PTM216Z send only release as a command without specifying the number pressed (release_1 like the PTM215Z/ZE). I would keep the proposed values.

I am currently working on a version where this helper is not required. You would need the event option to be set in Z2M