I used a text editor. The important parts of my Z2M config file are shown below.
homeassistant:
enabled: true
legacy_action_sensor: true
experimental_event_entities: true
serial:
port: >-
/dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_54ca405c9f9ced1197b17dfaa7669f5d-if00-port0
adapter: zstack
As you probably know, Z2M version 2 has deprecated support for the use of sensor entities to report button events (so-called “action sensors”). They have now aligned themselves with Home Assistant’s preference to use MQTT Device Triggers to detect button events.
I have a few automations that rely on action sensors. I will eventually modify them to use the new way of detecting button events. In the interim, to prevent breakage, I have enabled the legacy_action_sensor option. After I have updated the automations, I will disable the option (and the “action sensors” in my system will disappear).
In addition, I intend to use event entities to detect button events (instead of MQTT Device Triggers). Therefore I have enabled the experimental_event_entities option. As a result, Z2M creates an event entity for every remote-control device. I have already changed one of my automations from using a deprecated action sensor entity to an event entity.