Same issue here: my 2 aqara switches (Mi wireless switch (WXKG01LM)) seem to not have any action. Of course, any associated automation does not work any more as they do not have a trigger any more.
zigbee2mqtt [1.36.0] commit: [86ed71c]
It may be a coincidence, however I feel this issue happens since core update 2024.7.2
Hi, is anybody experiencing this issue again in January 2025 with the most recent version of Zigbee2MQTT (2.0.0) and Home Assistant (2025.1.0)?
Unfortunately I’ve upgraded both at the same time and I have no clue which one broke my Aqara mini switches this time;-)
[edit]
It seems to be a feature of the new Zigbee2MQTT version: Zigbee2MQTT 2.0.0 breaking changes · Koenkk/zigbee2mqtt · Discussion #24198 · GitHub
The Z2M upgrade broke a couple of my scene switches, they lost their Action trigger. I managed to fix them however, I don’t think it is the best method. I am posting this here hoping someone will come along and help me fix it the proper way.
I’m having same issue after installing ZigBee2MQTT 2.0.0-1.
I can see action in Z2M web interface, but action doesn’t appear in MQTT device interface.
My version of HA Core is 2024.12.5
Any help.
Thanks
All my entities have a technical name that is different from their friendly name.
In the past, zigbee2mqtt was maintaining the “technical name_action” but now after reactivating the settings to keep legacy fashion, the entity is "friendly name_action"
I am investigatingt to replace it by tthe “platform mqtt” triggering.
Just an FYI for those looking into this:
As someone mentioned previously, go to the Z2M settings page - home assistant integration and enable one of two options: or the legacy, or the experimental.
for me both were dissabled so I did not get the event nor the action entities
Loads of breaking changes in this z2m update, particularly if you setup z2m years ago.
Before updating to the latest z2m I’ve enabled the option “Home assistant experimental event entities” in Settings → Home Assistant Integration. I’ve left the legacy options intact for now
Restart z2m
Check the States page in Home Assistant for all of the new event.xyz_action entities that have appeared
4. In your YAML, update the old sensor.xyz_action entity name with the new event.xyz_action entity name.
In my case I don’t think any other changes are required? My event.xyz_action entities are named exactly the same as my sensor.xyz_action entities, so I only have to swap sensor for event in my YAML. And the actions themselves seem to be the same. ie “off-hold”, “single” etc
Sample YAML where I’ve only needed to swap out sensor with event:
</s> <s> - platform: state # zigbee2mqtt event</s> <s> entity_id: event.sitting_room_hue_dimmer_switch_action</s> <s> attribute: action</s> <s> to: "off-hold"</s> <s>
I’m not updating z2m yet though as I have to make this change across many YAML automations and also have to work out the impacts from the removal of legacy entity attributes; I’ve had that option enabled from day one and I think I have a lot of custom sensors and automations that rely on this.
That’s a good summary. The only thing I’d add is to make sure you have the new adapter: option set under serial: before updating or you may have issues connecting to your adapter.
I’m in the same situation as you in that the action states are deeply ingrained throughout my config and custom sensors. When I updated to 2.0.0-1 a ton of things broke and after a few hours debugging I restored to a backup of 1.40.2-1 at least get the house working again until I can figure out what to do.
I’m stuck trying to get the experimental event entities to show up in 1.40.2-1 so that I can start updating my automations, scripts and custom sensors. These event entities were neither there when I updated to 2.0.0-1 nor now since I’ve restored the add-on to a backup of 1.40.2-1 and added experimental_event_entities: true into my config. Maybe I have added this setting in the wrong place, or perhaps it is just not available in 1.40.2-1? Little trick I did’t know was that I needed homeassistant: true under socat in order for that part of the config to not just disappear on restart.
If you’re using the home assistant addon then you can change that setting in the Z2M GUI - go to Settings → Home Assistant Integration and enable Event Entities from there. After a restart of Z2M the new setting should then appear in the YAML. On my setup it seems like it might have taken 10 minutes or more for these “event.xyz” entities to appear in my list of entities in Home Assistant.
FYI I’ve been down a rabbit hole since my last post; my initial solution of swapping out sensor.xyz for event.xyz in my automations did not entirely work because this method would not detect repeat events from the same button. ie everything works fine if you have a 4-button remote and you press ON, then BRIGHTNESS UP, then BRIGHTNESS DOWN etc. But if you try to press BRIGHTNESS DOWN x 5 times then it only recognises the first press. This was the case with battery-powered Xiaomi wall switches, Xiaomi square buttons, and Xiaomi magic cubes. However the issue doesn’t seem to occur with Hue remotes or Xiaomi round buttons. Very odd.
So to solve this I refactored some automations using the Event trigger steps outlined here: Event - Home Assistant - using the event as a trigger and using conditions to detect the button / single / hold / shake etc. in this case it correctly performs an action on every button press, even repeated presses of the same button.
However over the course of this afternoon I found that ghost events were toggling lights and scenes and causing general hassle… no idea how, but ghost events like this never happened before with the old triggers. So I’ve removed those new event triggers and “gone native” with MQTT triggers such as below:
I won’t be updating to the 2.0 version for a few days until I’m sure everything is stable. I don’t think I’ve ever had to put so much research and work into a pre-migration.
I have this problem with several devices. I upgraded Z2M to 2.0.0 but am still on HA2024.12.5, so it is the Z2M upgrade that caused the problem. The MQTT action messages are there but the associated entities in HA are either missing or show no action.