please help.
how to get list switchLevel and create RestFull api to setLevel
here my code :
input "switchlevels", type: "capability.switchLevel", title: "Which Switchlevels?", multiple: true ,required: true
// then map
// switchLevel
path("/switchlevels") {
action: [
GET: "listSwitchlevels"
]
}
path("/switchlevels/:id") {
action: [
GET: "showSwitchlevel"
]
}
path("/switchlevels/:id/:lightLevel") {
action: [
GET: "updateSwitchlevel"
]
}
//then codefunction
//switchesLevel
def listSwitchlevels() {
log.debug " List listSwitchlevels params: ${params}"
switchlevels.collect{device(it,"switchLevel")}
}
def showSwitchlevel() {
show(switchlevels, "switchLevel")
}
void updateSwitchlevel() {
setLevelSwich(switchlevels)
}
so, I always get Error :
Smartthings not found devices type.
but I have an device type : Dimmer switch in link : https://shop.smartthings.com/#/products/ge-z-wave-wireless-lighting-control-lamp-module-dimmer