supportedFanSpeeds in 2.2.6

If you want the enum list in the device setSpeed command to reflect the values in your custom supportedFanSpeeds you will need to override the capability setSpeed command in the driver via something like:

command "setSpeed", [[name: "Fan speed*",type:"ENUM", description:"Fan speed to set", constraints: getFanLevel.collect {k,v -> k}]]

where getFanLevel in this case is:

import groovy.transform.Field
@Field Map getFanLevel = [
	"low": 25
	,"medium": 50
	,"medium-high": 75
	,"high": 100
	,"on" : 100
	,"off": 0
]
2 Likes