Thanks. Iāve read the thread and Iāve read your original post.
Reason I was here was to try and understand why the official recommended zigbee2mqtt method isnāt working, maybe I have missed that so will scoot back through the thread to check.
Zigbee2mqtt docs have 3 options. 1 is recommend, 2 is experimental and might break and 3 is legacy.
Iām happy to move away from legacy things so moved to the recommended and it simply doesnāt work.
Thatās all, the experimental method no doubt works but moving the button type presses to conditions requires a lot of reconfiguring of my automations.
Instead Iāve gone with the route of using the mqtt payload based on the recommendation within this thread, this means very little change to my automations and in fact has made my lights respond a lot quicker than before.
The Z2M team complied with a design decision made (some time ago) by the HA team regarding how a physical remote-control device should be modeled in Home Assistant.
The use of a sensor entity, to report the remote-controlās button events, was deprecated in favor of two alternatives.
The preference is to model it as a device so button events can be detected by MQTT Device Trigger (and the button events are self-documented). The other way is to model the button events using an event entity.
As you have already discovered, making the switch from sensor to event is fairly straightforward.
Iāll speculate for a moment and predict that Z2M will align itself even more closely with how event entities are implemented in Home Assistant.
Instead of one event entity per remote-control device, it will be one event entity per button. Thatās the way event entities are currently implemented in Home Assistantās Hue integration (Paulus is one of two owners of the Hue integration).
Hi Taras, I understand the decision and am in favor of bringing things in line with HA.
What Iām missing right now is the different type of button presses (long, double, triple) on some of my devices.
Do you know/think that this is something that is possible (technically) to have in the future?
My understanding is that Z2M simply reports whatever button events are provided by the deviceās firmware. The deviceās manufacturer creates the firmware; they decide how to express the deviceās capabilities in terms of the Zigbee protocol.
For example, if neither ZHA or Z2M report a double-click event for some device, itās highly likely the deviceās firmware simply doesnāt report it.
In Home assistant āDeveloper toolsā, you can see the information about the event types. This shows what the button is capable of. Rather than a long paragraph about it. See the picture. Yours should reveal your buttons capabilities too. On the event_types section.
With the first (Sonoff) I could use single, double an long with Z2M v1.x and still with the new approach of v2.0
The second one (IKEA) also had the ability to use single, double long with v1.x but not anymore with v2.0
Another IKEA button was even able to detect double & tripple press, now itās only singleā¦
The Z2M device pages donāt say anything about the button press abilities and I donāt understand why it worked before whereas now with the IKEA button.
I do not believe the 5 button round IKEA remotes ever natively supported double clicks. It is something I have seen implemented in blueprints where some wise detection of two presses with short pause between is triggered as double click.
Owkayā¦ so youāre saying that a blueprint can add double/triple click functions?!?
Of course I didnāt know that this was provided by the firmware or the BPā¦
If it did then there would be recent evidence that its documentation had been modified to remove the button events you claimed had existed prior to V2.
The latest PR that modified the documentation for the E1524 device was June 2024 (months before the availability of V2) and didnāt remove any button events.
The functionality you believe to have been lost was never there.
I agree with KennethLavrsen and you may be thinking of the additional functionality provided by an Automation Blueprint.
For example, I have IKEA E2001 and E1743 devices and neither modelās firmware explicitly reports a double-click event (not now, not ever). I created an automation to interpret two consecutive single-click button events as a double-click button event. Itās the same technique used by all blueprints that add ādouble-clickā functionality to a device that doesnāt natively report it.
I was trying to find out how these BP are doing it but with no luck and since it becomes clear to me how this was achieved I wondered how to do this in an automation so your response comes at the right time!
Would you mind sharing that part of the automation how you interpret a double/triple click?
What am I missing here, I have Home Assistant āEnabledā and āHome Assistant experimental event entitiesā checked in the zigbee2mqtt setting, Iāve given zigbee2mqtt a restart, but I still canāt see these event. entities. All I can see under the MQTT integration for the device is battery & power outage count?