this.switchState = switchState
this.currentSwitch = switchState
this.switchLatestValue = switchLatestValue
this.switchState = switchState
this.currentSwitch = switchState
this.switchLatestValue = switchLatestValue
this.hue = metaData["hue"]
this.currentHue = metaData["hue"]
this.saturation = metaData["saturation"]
this.hue = metaData["hue"]
this.currentHue = metaData["hue"]
this.saturation = metaData["saturation"]
println("the switch with id:$id is setted to level $level and hue to $hue and saturation to $saturation!")
sendEvent([name: "level", value: "$level", deviceId: this.id, descriptionText: "",
displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
println("the switch with id:$id is setted to level $level and hue to $hue and saturation to $saturation!")
sendEvent([name: "level", value: "$level", deviceId: this.id, descriptionText: "",
displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])