Hi,
As you asked in the private message i send to you, i was going to post the request here, so others could enjoy it too.
This blueprint is for the niko zigbee swtiches with 1 button.
I however have only 4gang zigbee switches from niko.
I tried adjusting your blueprint, i tried (with the help of ai) to make my own blueprint, but i was not able to create a well working blueprint (there was always an issue, ether it was the dim button not working anymore, or the double click not working…)
I have the following model: Niko 552-721X2 control via MQTT | Zigbee2MQTT
You said in private message that you wanted to include 2 gang and 4 gang switches, so i would be glad to be a test case for you 
Currently i have 22 switches, 21 of them are configured in zha and do actions from the zha events.
However, since a few days i’m setting up z2m, so step by step i’ll be migrating all switches to Z2M
Currently on zha i’m only to have a “on” action, an “off” action and an “hold” action.
Where your blueprint has “on”, “off”, “dim up”, “dim down”, “double click on” and “double click off”, so that are way more actions i would be able to use.
a quick question, is it the “goal” of your dim up/dim down that if you hold the button the light dims up/down by a certain percentage for each (lets say) 0.5 seconds you hold it?
Another question you might have an solution for (or maby you could build in):
My house has 4 floors.
On each floor i have a 4gang switch.
On each switch 1 button is programmed to turn on/off a light on floor A, one button for floor B, one for floor C and one for floor D.
But the downside is that (atleast in my config currently) a button has an “on” action and an “off” action.
But those actions are not synced between different switches/floors.
So it happens to many times that when i go upstairs i have to push a button 2 times because the button on that floor was in the wrong “action”.
For example when i go upstairs i turn on the light on floor 1, when i’m at floor 2 i press the button and the light turns off.
This means that for the button on floor 1 the next “action” is “off” and for the button on floor 2 the next “action” is “on”.
But lets say it sunny, i don’t need a light to go downstairs.
Later that day i want to go up the stairs again and i need ligth, so i click the button on floor 1.
But his next action was “off”, but the light already was off, so i need to click a second time so the actions is “on”, then i arrive at the second floor and i click the button, but this button next action was “on”, but the light needs to turn off, so i need to press a second time.
Combine this with a wife that doens’t yet remember the “which button controls which floor” (because we just moved in to our house) and it makes that my staircase turns in the a christmas tree sometimes because my wife is clicking multiple times on multiple buttons because she thinks she pressed the wrong button, but actually it was the right button but the “next action” was wrong/not synced…
I tried (with ai) to make a fix for this, i tested it in the toilet on the ground floor and this seems to work, but mayby you have a better solution.
Right now i have adjust the zha automation for those buttons and i have the following yaml’s for it:
A central button handler for this lighting point:
alias: AAAAAAtest V0 - Toilet - central button handler
description: Central handler voor toilet lamp endpoints 1 en 4
triggers:
- event_type: zha_event
event_data:
device_ieee: 00:3c:84:ff:fe:8b:e9:11
endpoint_id: 1
trigger: event
- event_type: zha_event
event_data:
device_ieee: 00:3c:84:ff:fe:8b:e9:11
endpoint_id: 4
trigger: event
actions:
- variables:
ep: "{{ trigger.event.data.endpoint_id | int }}"
next_helper: |-
{% if ep == 1 %}
input_boolean.toilet_ep1_next_on
{% elif ep == 4 %}
input_boolean.toilet_ep4_next_on
{% else %}
input_boolean.toilet_ep1_next_on
{% endif %}
next_is_on: "{{ states(next_helper) == 'on' }}"
- choose:
- conditions:
- condition: template
value_template: "{{ next_is_on }}"
sequence:
- target:
entity_id: light.v0_toilet_licht_light
action: light.turn_on
- target:
entity_id:
- input_boolean.toilet_ep1_next_on
- input_boolean.toilet_ep4_next_on
action: input_boolean.turn_off
- target:
entity_id: input_boolean.toilet_virtual_state_on
action: input_boolean.turn_on
- conditions:
- condition: template
value_template: "{{ not next_is_on }}"
sequence:
- target:
entity_id: light.v0_toilet_licht_light
action: light.turn_off
- target:
entity_id:
- input_boolean.toilet_ep1_next_on
- input_boolean.toilet_ep4_next_on
action: input_boolean.turn_on
- target:
entity_id: input_boolean.toilet_virtual_state_on
action: input_boolean.turn_off
mode: single
and i had to make booleans and put them in my configuration.yaml:
# configuration.yaml (of input_boolean.yaml)
input_boolean:
# Virtuele lampstatus
toilet_virtual_state_on:
name: Toilet virtuele status
initial: off
icon: mdi:lightbulb
# Endpoint 1: volgende actie ON?
toilet_ep1_next_on:
name: Toilet endpoint 1 volgende actie ON
initial: on
icon: mdi:toggle-switch
# Endpoint 4: volgende actie ON?
toilet_ep4_next_on:
name: Toilet endpoint 4 volgende actie ON
initial: on
icon: mdi:toggle-switch
But i hope there is a “quicker/cleaner” way.
Because if i have to create boolean records for each of my 126 innr lightbulbs, i’ll have some timeconsuming job ahead 