我有以下代码:
cType: types.ROTATION_SPEED_CTYPE,
onUpdate: function(value) { console.log("Change:",value); execute("Fan", "Fan Speed", value); },
perms: ["pw","pr","ev"],
format: "float",
initialValue: 100,
supportEvents: false,
supportBonjour: false,
manfDescription: "Change the speed of the fan",
designedMinValue: 0,
designedMaxValue: 99,
designedMinStep: 33,
unit: "percentage"
我如何根据不同的“值”执行不同的脚本,特别是在“onUpdate”上