Exporting all devices (plus useful info)

Hi, I’m looking for a way to query the available triggers of a device from the outside – ideally via REST.
For example, I have an IKEA button that offers dim up/down and on/off. In the UI this is exposed in the automation-dialogues and most likely coming from device_automation_triggers. How would I go about getting this result either in a template or an API endpoint?

Probably I’m digging for a more general solution: device_attr() is rather selective, it seems, in that it only supports some attributes. Can’t it just expose anything that is annotated as @Property directly?

Thanks in advance for any input,
Volker