Hi, I have a problem with automations after switching to events. After restarting the Z2M add-on, all of my automations are triggered. I have buttons and lights connected via Zigbee. I read on the forum that this is caused by the ‘retain’ flag, but from what I can see, it is turned off for these devices. Does anyone know what this could be and how to fix it?
You need to exclude state changes from unavailable
to something from your trigger (i.e. by using not_from
or a condition).
Post your trigger section from one of those automations.
Hi, Big problems here too with 2.0 update.
Updated that new zigbee2mqtt2.0.2 version and after that all my Zigbee2mqtt stopped working totally.
I do changes to configuration.yaml (Is this normal → password: place read only mqttpass, not real password?)
Then i clicked Zigbee2mqtt settings → home assistant → legacy action sensors.
After that do normal restart and after that full reboot, still nothing works. Not Ikea buttons, not Philips buttons, not aqara sensors (temp/door), not wall sockets (ikea). Everything is down.
This my mqtt_sensors one button configuration:
When i click that button, MQTT explorer shows message normally:
Development settings → states show like this:
I try experimental event entities, after that i see event.buttons and they show buttons click right way, but i use node-red and want use legacy sensors. Because that i but experimental event entities off and but legacys enable and restart and boot home assistant. Event.* sensors disappier "Developer tools → States list normally after that, but normal sensors entity just read unavailable like picture upper this message.
And after all this event -update not explain why my any sensor, sockets or anything working anymore after that zigbee2mqtt 2.0 update. Dont understand how this bad update goes live and mess so many HA installations over world.
Many thanks if someone can help how i get legacy sensors working again.
_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.