Tuya Zigbee Mini Remote (YSR-MINI-Z) Zigbee2MQTT

This Blueprint allows you define the actions to be taken when perform a single click, double click or hold on the Tuya Zigbee Mini Remote (YSR-MINI-Z). This blueprint specifically is for use with Zigbee2MQTT. I purchased mine here (not an affiliate link).

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

blueprint:
  name: Tuya Zigbee Mini Remote
  description: "Blueprint for use with Tuya Zigbee Mini Remote (YSR-MINI-Z) on Zigbee2MQTT"
  domain: automation
  input:
    switch:
      name: Tuya Zigbee Mini Remote
      description: Aqara switch to use
      selector:
        entity:
          domain: sensor
          integration: mqtt
          multiple: false
    1_single:
      name: Button 1 - simple click
      description: Action to run on triple click of button 1
      default: []
      selector:
        action: {}
    1_double:
      name: Button 1 - double click
      description: Action to run on triple click of button 1
      default: []
      selector:
        action: {}
    1_hold:
      name: Button 1 - hold click
      description: Action to run on triple click of button 1
      default: []
      selector:
        action: {}
    2_single:
      name: Button 2 - single click
      description: Action to run on triple click of button 2
      default: []
      selector:
        action: {}
    2_double:
      name: Button 2 - double click
      description: Action to run on triple click of button 2
      default: []
      selector:
        action: {}
    2_hold:
      name: Button 2 - hold click
      description: Action to run on triple click of button 2
      default: []
      selector:
        action: {}
    3_single:
      name: Button 3 - simple click
      description: Action to run on triple click of button 3
      default: []
      selector:
        action: {}
    3_double:
      name: Button 3 - double click
      description: Action to run on triple click of button 3
      default: []
      selector:
        action: {}
    3_hold:
      name: Button 3 - hold click
      description: Action to run on triple click of button 3
      default: []
      selector:
        action: {}
    4_single:
      name: Button 4 - single click
      description: Action to run on triple click of button 4
      default: []
      selector:
        action: {}
    4_double:
      name: Button 4 - double click
      description: Action to run on triple click of button 4
      default: []
      selector:
        action: {}
    4_hold:
      name: Button 4 - hold click
      description: Action to run on triple click of button 4
      default: []
      selector:
        action: {}

trigger:
  - platform: state
    entity_id: !input "switch"
    attribute: action

mode: queued
max_exceeded: silent

action:
  - variables:
      command: "{{ trigger.to_state.state }}"
  - choose:
      - conditions:
          - "{{ command == '1_single' }}"
        sequence: !input "1_single"
      - conditions:
          - "{{ command == '2_single' }}"
        sequence: !input "2_single"
      - conditions:
          - "{{ command == '3_single' }}"
        sequence: !input "3_single"
      - conditions:
          - "{{ command == '4_single' }}"
        sequence: !input "4_single"
      - conditions:
          - "{{ command == '1_double' }}"
        sequence: !input "1_double"
      - conditions:
          - "{{ command == '2_double' }}"
        sequence: !input "2_double"
      - conditions:
          - "{{ command == '3_double' }}"
        sequence: !input "3_double"
      - conditions:
          - "{{ command == '4_double' }}"
        sequence: !input "4_double"
      - conditions:
          - "{{ command == '1_hold' }}"
        sequence: !input "1_hold"
      - conditions:
          - "{{ command == '2_hold' }}"
        sequence: !input "2_hold"
      - conditions:
          - "{{ command == '3_hold' }}"
        sequence: !input "3_hold"
      - conditions:
          - "{{ command == '4_hold' }}"
        sequence: !input "4_hold"
1 Like