Where do device methods live?

I’m in the process of migrating from ST to HA and am moving many of my automations from SharpTools that couldn’t be done in the ST app to HA. I have several Inovelli switches that I set notification colors/effects on the LEDs, these switches are different models. SharpTools exposes a common method that sends them all. For example setNotificationColor():

In HA…I was hoping to do the same thing and call one common method to set the color for all of the switches, but it looks like in HA, the different models have different ways of setting them. There is no common setNotificationColor()
I have to set each switch separately (maybe I don’t, but I’m still pretty new to HA so still learning), for example. To set the color on one switch I have to use this:

On a different switch, I have to call this:

I can make it work in HA by selecting each switch and each method and setting them individually, but that takes 18 lines/steps to do it. In SharpTools, since they all use a common method, I can do it in 3.

This has me wondering how this works in SharpTools? Why is it different between ST and HA? My assumption is that SharpTools is simply exposing the Edge Drivers in ST and that’s how the driver was coded by Inovelli for ST and it’s displaying whatever the equivalent to a Edge driver is for HA?

TLDR: I don’t really have a problem, just curious how these systems works. Any explanation would be appreciated.

The device methods are generally exposed by each smart home platform.

For platforms like SmartThings and Hubitat which share a core ‘capability’ system, all of their device commands and attributes are passed through directly.

For platforms like Home Assistant and Homey, we coerce common device types into standard capabilities like you see from SmartThings and Hubitat to keep things straightforward. That only covers the most common device types and standardized methods / attributes… custom methods / attributes and more esoteric device types are passed through automatically.

Note that the translation for common device types is happening internally within SharpTools - translating the unique HASS/Homey attribute names into their standard SharpTools equivalents and similarly when going the other way to expose standard SharpTools methods into their HASS/Homey equivalents.

And of course, there are some cases probably like your example in HASS where the device doesn’t expose a simplified standardized method and some platforms like HASS expose advanced options for sending Zigbee / Z-wave configurations at a lower level.