While not exactly the answer you are looking for, you can probably accomplish this with Node Red, and “events: all” and “call services”.
Just a bit of prep work:
click on your name at the bottom left of the home assistant side bar and then toggle “Advanced Mode” to on.
Then click on “Developer Tools”
Then “Events”
Under “Listen to events” type:
*
and then click “START LISTENING”
push the first button you want to automate. You should see something like this: (note I am doing this with a different device, so what you will see should/may be very different, but you can use the same process):
{
"event_type": "zha_event",
"data": {
"device_ieee": <sanitized>,
"unique_id": <sanitized>,
"endpoint_id": 1,
"cluster_id": 8,
"command": "step_with_on_off",
"args": [
0,
43,
5
]
},
"origin": "LOCAL",
"time_fired": <sanitized>,
"context": {
"id": <sanitized>,
"parent_id": null,
"user_id": null
}
}
I put in to remove identifying information. The important part is what is in the “command”.
The next thing you need to do is open home assistant in a new tab, and issue the cluster command the same way you were doing, that you want to control with the button you just pressed. Make sure you are still listening to *
you should see something like this:
{
"event_type": "call_service",
"data": {
"domain": "zha",
"service": "issue_zigbee_cluster_command",
"service_data": {
"ieee": "00:00:00:00:00:00:00:00",
"endpoint_id": 1,
"cluster_id": 257,
"cluster_type": "out",
"command": 6,
"command_type": "server",
"args": [
0
]
}
},
"origin": "LOCAL",
"time_fired": <sanitized>,
"context": {
"id": <sanitized>,
"parent_id": null,
"user_id": <sanitized>
}
}
The important part is the part in the data squiggly brackets.
with these two things you can head over to Node Red (you may need to install this if you haven’t).
In node red drag in the “events: all” box
double click on it
give it a name (doesn’t matter)
under “Event Type” select:
zha_event
next up, add a “switch” box
connect the two nodes with a line
double click on the switch box
give it a name (doesn’t matter)
under Property make sure “msg.” is selected
and then type
payload.event.command
this will refer to the command in the first code block from the remote (for me this was “step_with_on_off”, for you it may be different)
underneath that select “==” from the drop down menu, select “az” from the next drop down menu, and in the dialog box type the command, for me with the command “step_with_on_off”, I would type:
step_with_on_off
to add additional commands, click the “+add” button near the bottom.
scroll back up and add the node “call service”
connect this to the right side of the switch with a line
double click on it
give it a name (doesn’t matter)
in domain select:
zha
in service select:
issue_zigbee_cluster_command
leave “Entity Id” blank
under “Data”, click the “…” at the right of the dialog box, copy paste everything from the cluster command after "service_data: " until the comma before “origin” into that, then click “format json”, so for me this looked like:
{
"ieee": "00:00:00:00:00:00:00:00",
"endpoint_id": 1,
"cluster_id": 257,
"cluster_type": "out",
"command": 6,
"command_type": "server",
"args": [
0
]
}
click deploy at the top right of node red, and then see if your button works (it should) repeat this for all buttons, adding statements to the switch if needed.
Let me know if that works or if you need any help