_click
sensors are gone, even with legacy action sensors, you need to use _action
.
It’s all explained in the beginning from this thread.
With Z2M 2.0 there is a breaking change and now you need to use event.<your_device>.action in your automations.
If Z2M works well, you see those in the Developer tools → STATES
The attributes reveal which actions you can use a trigger in your automtions.
Thx for reply i need to change them.
Any ideas why any power sockets/door/temperature sensors not work anymore after update.
@Nick4 Event.* sensors not work on Node-red.
Solution:
Find out my old config to mqtt_sensors.yaml and mqtt_switches.yaml blocked them working right with this new 2.0.x version, i just delete them totally my .yaml files and restart HA. HA automatically work new entities and after change them to Node-red everything working. Hope this help someone.
Is there already a blueprint which will work with the new action events?
There are some, depending on the type of device.
This post was helpful - thanks! I was wondering what happened to my Hue remotes!
I ended up leaving my config and enabling the legacy option. I created a custom automation a long time ago that uses a counter sequence so that I can change scene colors on my hues by double tapping the on button. I wanted to keep that, so this fixed it, albeit with a strange bug where the first press registers as 2 instead of one. I just incremented it tho. It’s a little complex, but it works as intended lol.
Hi all, So I have HA running on my Raspberry Pi. All was working as expected. I have a Sonoff Zigbee dongle and running zigbee2mqtt. I use Node-Red as for my automations. Everything worked perfectly as I wanted it to work. January I upgraded to HA2025.1 and all my buttons automations broke. Looked at Node-REd and all actions are missing. So I rolled back to my backup and everything works again. On my NUC I installed HA with a SkyConnect. This is my test environment. Configured an aqara mini button (Zigbee) and it was setup with no problems though ZHA. Upgraded that to HA 2025.1 and again, Actions for the button is missing. I must be missing something very basic but I just cant find what it is. And yes, I did reboot the PI and the NUC after the upgrade, used different PC’s to test if it is my browser and still cant get the actions.
Hey Chris. Thanks for the info. Unfortunately that doesnt help because the ACTION entity doesnt show in Node-Red at all. It shows the battery and the Linkquality but the action entity is missing completely.
@MartinEngelbrecht Make sure the z2mqtt settings Home assistant integration has the “Experimantal entities” ticked and reboot.
Remember it is event.whateverACTION not sensor.whateverACTION
Home Assistant | Zigbee2MQTT - so Device Trigger i.e. the recommended way doesnt seem to work for me. I can see the response in MQTT, i can see the action button update in HA but nothing is triggering my automation.
Using the experimental method i guess works but moving to templates to then decide which button was pressed is a regression here especially when before it was easy to use the trigger ID within the choose option.
Stay away from device triggers if you want readable automation,
And please, read my original posting of this thread. The entire posting. The last updates to this thread feels like you only read the headline and then scrolled down
Let me check that again and will get back to you. Thanks.
Chris, very strange. On HA 2025.1.0, 1,2,3 that did not work for me. But I just upgraded to HA2025.1.4 and now it works. Not sure why but it at least is now working. Thank you. You are a rock star.
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.
this! Why was this change done? I don’t get it. The old way worked perfectly with the action entity. Why take it away?
Heres what I had to do to get my Aqara/Xiamoi buttons works in NR again.
-
Turn experimental on in Z2MQTT
-
Rename the new event entity to what I want.
-
Go into NR and points the Events state node to the new event entity
-
Change the property of my switch node from msg.payload to msg.data.new_state.attributes.event_type
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.
Yes and no. I did the experimental option which is noted may break in the future. The recommended way will be even more of a headache.