Switch Types ???

I am hoping someone can help me out with a snippet of code for this as I am programmer (Delphi, php, SQL) but not familiar here… yet.

I am writing an app where I want to let the user select from all of their switches, on/of and dimmers). But, I want to turn on the dimmers using “settings.MultilevelSwitch?.setLevel(number)” rather then “on” But I don’t know how to tell if a switch is a dimmer or not.

Can someone point me in the right direction. Thanks.