The most relevant title I could find for the dashboard is Level Vertical.
It is displayed as a slider with %.
However it is not working as expected. Changing the slider works and updates the device state, however when the device is changed (via device directly) the slider won't update.
I did some digging, in Settings > advanced > devices > (my device with SwitchLevel state)
It shows under current states as switch:off.
SwitchLevel is not a standard attribute. SwitchLevelis a standard capability (see: capability docs), with a required level attribute. That is the attribute that the "Level" and "Level Vertical" Dashboard templates will display (and via the also-required-for-this-capability setLevel() command also manipulate when changed). Did you intend to use level in your driver instead?
Perhaps you already know the above and are using a custom attribute intentionally. In that case, no standard Dashboard tile template will work with this attribute for manipulation (at least not without workarounds--like a button that sends the appropriate commands). However, you can still make it display the current value with the "Attribute" template, providing the name of this custom attribute when asked.
Yes I want level to be changed / reflected. I understand now SwitchLevel is a standard capability with a level attribute.
I am using setLevel on change. I do want to use level yes, not sure about the relationship between the two as there is limited documentation, this is my first driver. Help would be appreciated.
"SwitchLevel" here should be "level". The name parameter in sendEvent is the name of the attribute you are generating an event for. Generating events is (more or less; you do have some control over whether it actually counts as an event) is how attribute valΓΊes are changed. Aside from declaration in the metadata, the capability name doesn't matter--just the attributes and commands the capability requires.
Next problem involving switchLevel:
A device with switchLevel as the only capability won't show up under Authorize {app} to access your Hubitat Devices:
I can't speak to how the SharpTools device selector works, but from your screenshots, it appears that it's looking for devices that implement "Switch" and not (only) "SwitchLevel." Capabilities are the most common method by which apps prompt users to select devices (to ensure you're choosing a device appropriate for the task at hand, like a motion sensor for a motion-lighting app). If SharpTools only specifically allows "Switch," it's likely because nearly any device that implements "SwitchLevel" also implements "Switch" (presumably the most common application of this is a dimmer switch or dimmable smart bulb: on/off control from Switch, plus level control from SwitchLevel), a design choice on their part.
Have you tried capability "Actuator" to see if that shows up anywhere in this selector? (This capability is kind of a catch-all that requires no attributes or commands but generally is something "implemented" by any device that can receive commands. Some apps further use it as a last-resort device-selection mechanism.) If you really need to, you could implement "Switch" and just implement dummy/stub "on"/"off" methods (and set the "switch" attribute to something), though perhaps another capability would make it show up somewhere here. But again, I can't really speak to what specific capabilities the various selectors are looking for here.
PS -
You only need to declare custom attributes, i.e., ones that are not part of a "standard" capability you are implementing, so you could leave this line out. In my experience, Hubitat is graceful about ignoring (or otherwise handling) the re-declaration of an attribute that is already there, but it's still less typing.
The reasoning that nearly every device that implements SwitchLevel also implements Switch is spot on. Otherwise showing a separate SwitchLevel section in the authorizations would result in duplicates for most people.
Side note: If your device driver has the ability to set the level to 0, you could map that to off and anything above 0 to on. Similarly, an off() command could map to a setLevel(0) and if you wanted to get fancy, you could store the last level in state and when you send an on() command, you could restore that state eg. setLevel(previousLevel)
The SharpTools web based authorization flow presents the core list of capabilities (Switch, Contact, MotionSensor, Lock, etc). You can also manually authorize devices which implement either of the Actuator or Sensor generic capabilities.