Not as difficult as you think. All the hard work has been done. Here’s the variable for the on/off function. Just create one for Control.Level
var device = new Device
{
name = module.Name,
offUrl = $"http://{hgEndpoint}/api/{module.Domain}/{module.Address}/Control.Off",
onUrl = $"http://{hgEndpoint}/api/{module.Domain}/{module.Address}/Control.On",
deviceType = "switch"
};
What do you reckon.
Don’t push too hard or they may forget you.