The ergonomics of this is really bad and it has also a side effect, that with restart of the HA, the last event is retriggered - resulting in passing some of the condition unintentionally.
There should be an easy way on how to automate Matter buttons.
The button entity is actually a patch solution to people not being able to understand events.
The HA event bus is the correct place to handle that, because the entities only hold the last “state”, which means the user miss the understanding and opportunity to handle on all the other intermediate “states” that occur in many button presses.
The one view you see for Zigbee might be the developer of the integration or the manufacturer of the device that went the extra mile.
With Matter the standard is very specific and nothing can be changed.
Ok, how do I prevent it from calling the automation after the HA restarts (so I won’t receive the last event? If I only set it up when it changes its value, it will not work after the same event is sent again.
Please do not say “nothing can be done with this”. It definitely needs a change - if not technical, then UX at least.
The situation is clearly described here:
3.2.2 CAUTION - Check Your Work - You must leave the Attribute, From, and To fields blank.
You’ll be tempted to take a shortcut of selecting the “Event Type” attribute and a “To” value like “Pressed 2 times”. Don’t do it! This will cause the automation to be unreliable.
This is causing the issue of retriggering the event after the restart. Do you have a solution for that?
I completely agree that the UX is horrible for automating buttons, especially for Matter devices. Event entities were once invented as a solution to that issue but in its current shape they actually made the issue worse.
There is work in progress on improving the whole automations editor and flow, but that is something that is not simply done in a couple of days, it needs a lot of work.
Until then, we have adjusted the documentation how to handle with event entities.
Only solution for now is listening to a change of the event entity (do not specify the event type in the trigger) and then either use a condition on the specific type or create a choose to compare the state of event type to figure out what event type was actually fired.
That’s the only solution for now I’m afraid. The device triggers (like you see with zigbee etc) are not implemented for Matter and because those are going away, I can’t add them anymore so we’re stuck between a rock and a hard place.
Thank you for your response. I am glad that there are ongoing changes and I am aware that it is not a trivial feature in any regards.
But could you please suggest on how to handle HA restarts? It happens to me, that automations that implement this event handling like you described are re-triggering when HA is restarted. How can I prevent this?