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.
EDIT: check my post below for some issues with this approach, such as automations not triggering where the same button is pressed more than once: Action entity missing for zigbee switches - Zigbee2MQTT - #25 by jdbrookes
You should instead follow the guide below to handle the new event entities: Using the new action events in Zigbee2MQTT 2.0 - Configuration / Zigbee - Home Assistant Community