Use group send by remote in HA for Automation

I have a Zigbee remote that supports to send command to 3 different groups.

HA seems to see only the action without difference in the group.

Z2M receives the groupid, is there a way to use it in HA to automate the remote other then pair the devices directly with the group in Zigbee. In this case status if switched by the remote will be wrong in HA.