you need to make automations for every action (1 press, 2 presses, long press)
my automation for button 1 1 press (it toggles 2 smart plugs)
alias: AB button 1
description: ""
trigger:
- device_id: 3cf7bf06d42ed509a1cccc26ad5bc7ca
domain: zha
platform: device
type: remote_button_short_press
subtype: button_1
condition: []
action:
- type: toggle
device_id: 1367b19ed80ad690fc625ce0ed3e58ed
entity_id: switch.wk_tl01_switch
domain: switch
- type: toggle
device_id: 442ede3271c6ba9fd8a25ff2224c8a9f
entity_id: switch.wk_tl02_switch
domain: switch
mode: single