Tile for multistate switch - request

Hey

Could you please add new tile template which can handle multistate virtual switch from the topic below?
https://community.hubitat.com/t/multi-position-virtual-switch/44467

@bravenel created simple "Virtual Switch Multi" but there is no elegant and simple way to put it on the dashboard,
Code below:

metadata {
	definition (name: "Virtual Switch Multi", namespace: "hubitat", author: "Bruce Ravenel") {
		capability "Switch"
		command	   "select", [[name: "Switch-3",type:"ENUM", description:"Switch-3", constraints: ["on", "off", "away"]]]
    attribute  "selection", "ENUM"
	}
	preferences {
		input name: "txtEnable", type: "bool", title: "Enable descriptionText logging", defaultValue: true
	}
}

def installed() {
	log.warn "installed..."
	off()
	select("off")
}

def updated() {
	log.warn "updated..."
	log.warn "description logging is: ${txtEnable == true}"
}

def parse(String description) {
}

def on() {
	def descriptionText = "${device.displayName} was turned on"
	if (txtEnable) log.info "${descriptionText}"
	sendEvent(name: "switch", value: "on", descriptionText: descriptionText)
}

def off() {
	def descriptionText = "${device.displayName} was turned off"
	if (txtEnable) log.info "${descriptionText}"
	sendEvent(name: "switch", value: "off", descriptionText: descriptionText)
}

def select(val) {
	def descriptionText = "${device.displayName} was set $val"
	if (txtEnable) log.info "${descriptionText}"
	sendEvent(name: "selection", value: "$val", descriptionText: descriptionText)
}

For me it could work very similar like "Mode" tile. When you click on the tile, new window appears and you can pick the mode (one of configured options for virtual switch multi).

For example I would like to have a switch which has 3 possible options: "Auto mode", "Semi auto", "Hand mode".

It would be very useful I think.
Is there a chance you can add this feature in the near future?

For sure it would be nice if there was a simple way to choose a multiple switch setting from a single tile. There is a way, but with 2 tiles. Please check the original thread. You have a button tile you press and the other tile changes to indicate the current switch setting. It works quite nicely.

Yeah I saw and it really works nice but it doesnt look good. It is only another workaround.
I prefer to wait for native solution if there is only a chance for that..

2 Likes