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?