Find entyity type and capabilties (switch... button)

I use pyscript (not python_script) from creating automations, but I guess this question is also for other ways of automations.
When I create an automation in the HA UI, and I select a button, it seems to “know” what buttons events are available;
Question: As I want to create an script in pyscript to handle switches, I would like to retrieve at least the name of the switch. like HUE SMART BUTTON (not something like button_1). So, I know it’s a HUE Smart Button. Even better, it would be nice to retrieve the how many buttons a switch has.
A HUE smart button has only 1 button of course and can only generate a short click event, a long click event (from dimming).
The HUE Dimmer switch has 4 buttons (on/off/dim up, dim down)…;
Is there a way to retrieve it?
Getting the name of the switch (like HUE SMART BUTTON,HUE DIMMER SWITCH, …) would already a good start. Retrieving more, even better…