Zigfred Uno Blueprint zigbee2mqtt

I just wanted to share my Blueprint for the Zigfred Uno in zigbee2mqtt. Thanks to @TriffidXL for your work for zha which gave me the inspiration to do the same for zigbee2mqtt.
Please be aware to enable first the double click within the zigfredapp when config your button layout.

blueprint:
  name: Zigfred Button Configuration
  description: >
    Konfiguriere Aktionen für die Zigfred-Tasten mit Unterstützung für Single, Double, Hold und Release.

    Dieses Blueprint basiert auf MQTT und funktioniert mit Zigbee2MQTT.
  domain: automation
  input:
    device:
      name: Zigfred Steuerung (Device)
      description: Das Zigfred-Gerät aus Zigbee2MQTT.
      selector:
        device:
          integration: mqtt
    button_1_single:
      name: Taste 1 Einzelklick
      description: Aktion für Einzelklick auf Taste 1.
      default: []
      selector:
        action: {}
    button_1_double:
      name: Taste 1 Doppelklick
      description: Aktion für Doppelklick auf Taste 1.
      default: []
      selector:
        action: {}
    button_1_hold:
      name: Taste 1 Halten
      description: Aktion für Halten auf Taste 1.
      default: []
      selector:
        action: {}
    button_1_release:
      name: Taste 1 Loslassen
      description: Aktion für Loslassen nach Halten auf Taste 1.
      default: []
      selector:
        action: {}
    button_2_single:
      name: Taste 2 Einzelklick
      description: Aktion für Einzelklick auf Taste 2.
      default: []
      selector:
        action: {}
    button_2_double:
      name: Taste 2 Doppelklick
      description: Aktion für Doppelklick auf Taste 2.
      default: []
      selector:
        action: {}
    button_2_hold:
      name: Taste 2 Halten
      description: Aktion für Halten auf Taste 2.
      default: []
      selector:
        action: {}
    button_2_release:
      name: Taste 2 Loslassen
      description: Aktion für Loslassen nach Halten auf Taste 2.
      default: []
      selector:
        action: {}
    button_3_single:
      name: Taste 3 Einzelklick
      description: Aktion für Einzelklick auf Taste 3.
      default: []
      selector:
        action: {}
    button_3_double:
      name: Taste 3 Doppelklick
      description: Aktion für Doppelklick auf Taste 3.
      default: []
      selector:
        action: {}
    button_3_hold:
      name: Taste 3 Halten
      description: Aktion für Halten auf Taste 3.
      default: []
      selector:
        action: {}
    button_3_release:
      name: Taste 3 Loslassen
      description: Aktion für Loslassen nach Halten auf Taste 3.
      default: []
      selector:
        action: {}
    button_4_single:
      name: Taste 4 Einzelklick
      description: Aktion für Einzelklick auf Taste 4.
      default: []
      selector:
        action: {}
    button_4_double:
      name: Taste 4 Doppelklick
      description: Aktion für Doppelklick auf Taste 4.
      default: []
      selector:
        action: {}
    button_4_hold:
      name: Taste 4 Halten
      description: Aktion für Halten auf Taste 4.
      default: []
      selector:
        action: {}
    button_4_release:
      name: Taste 4 Loslassen
      description: Aktion für Loslassen nach Halten auf Taste 4.
      default: []
      selector:
        action: {}

trigger:
  - platform: device
    device_id: !input device
    domain: mqtt
    type: action
    subtype: button_1_single
  - platform: device
    device_id: !input device
    domain: mqtt
    type: action
    subtype: button_1_double
  - platform: device
    device_id: !input device
    domain: mqtt
    type: action
    subtype: button_1_hold
  - platform: device
    device_id: !input device
    domain: mqtt
    type: action
    subtype: button_1_release
  - platform: device
    device_id: !input device
    domain: mqtt
    type: action
    subtype: button_2_single
  - platform: device
    device_id: !input device
    domain: mqtt
    type: action
    subtype: button_2_double
  - platform: device
    device_id: !input device
    domain: mqtt
    type: action
    subtype: button_2_hold
  - platform: device
    device_id: !input device
    domain: mqtt
    type: action
    subtype: button_2_release
  - platform: device
    device_id: !input device
    domain: mqtt
    type: action
    subtype: button_3_single
  - platform: device
    device_id: !input device
    domain: mqtt
    type: action
    subtype: button_3_double
  - platform: device
    device_id: !input device
    domain: mqtt
    type: action
    subtype: button_3_hold
  - platform: device
    device_id: !input device
    domain: mqtt
    type: action
    subtype: button_3_release
  - platform: device
    device_id: !input device
    domain: mqtt
    type: action
    subtype: button_4_single
  - platform: device
    device_id: !input device
    domain: mqtt
    type: action
    subtype: button_4_double
  - platform: device
    device_id: !input device
    domain: mqtt
    type: action
    subtype: button_4_hold
  - platform: device
    device_id: !input device
    domain: mqtt
    type: action
    subtype: button_4_release

action:
  - choose:
      - conditions: '{{ trigger.payload == "button_1_single" }}'
        sequence: !input button_1_single
      - conditions: '{{ trigger.payload == "button_1_double" }}'
        sequence: !input button_1_double
      - conditions: '{{ trigger.payload == "button_1_hold" }}'
        sequence: !input button_1_hold
      - conditions: '{{ trigger.payload == "button_1_release" }}'
        sequence: !input button_1_release
      - conditions: '{{ trigger.payload == "button_2_single" }}'
        sequence: !input button_2_single
      - conditions: '{{ trigger.payload == "button_2_double" }}'
        sequence: !input button_2_double
      - conditions: '{{ trigger.payload == "button_2_hold" }}'
        sequence: !input button_2_hold
      - conditions: '{{ trigger.payload == "button_2_release" }}'
        sequence: !input button_2_release
      - conditions: '{{ trigger.payload == "button_3_single" }}'
        sequence: !input button_3_single
      - conditions: '{{ trigger.payload == "button_3_double" }}'
        sequence: !input button_3_double
      - conditions: '{{ trigger.payload == "button_3_hold" }}'
        sequence: !input button_3_hold
      - conditions: '{{ trigger.payload == "button_3_release" }}'
        sequence: !input button_3_release
      - conditions: '{{ trigger.payload == "button_4_single" }}'
        sequence: !input button_4_single
      - conditions: '{{ trigger.payload == "button_4_double" }}'
        sequence: !input button_4_double
      - conditions: '{{ trigger.payload == "button_4_hold" }}'
        sequence: !input button_4_hold
      - conditions: '{{ trigger.payload == "button_4_release" }}'
        sequence: !input button_4_release

Hello SIT,
Welcome to the Home Assistant Forum!

Thanks for contributing to the community with a new Blueprint.

I have a suggestion for you. Many people who are not familiar with directory structures will have problems installing this without the Home Assistant MY tools.

Adding a MY link for this Blueprint to your top post would help them a lot.

Here is the link to make that.
Create a link – My Home Assistant