Change Switch Label from On/Off to Words?

I created a new device in the IDE using the Simulated Switch type. The Icon on the Things page just shows the “ON/OFF” status in the bottom gray portion.

Is it possible to change that ON/OFF wording on the bottom of the icon to a number? That way I can identify the correct simulated plug

I guess I sort of got this for now. I created a new Custom Device Type and have changed the label to ${name} which works for the ON/OFF, and if I give label TEST, then it’ll show test.

Any way to make it dynamic so I can assign this to 8 buttons and have it show the label of the device?

standardTile("button", "device.switch", width: 2, height: 2) {
			state "off", label: '${name}', action: "switch.on", icon: "st.Outdoor.outdoor12", backgroundColor: "#ffffff", nextState: "on"
			state "on", label: '${name}', action: "switch.off", icon: "st.Outdoor.outdoor12", backgroundColor: "#79b821", nextState: "off"
		}

I see some other labels using ${currentValue}, but can’t seem to get a dynamic number in that area instead of On/Off.

I guess I could create 8 custom device types, all with the specific label I’m looking for, but it would be great to somehow pull the info off the device’s display name.

Thoughts?

If it was me, I would probably just use the SmartTiles dashboard app instead. You can do a lot of customization with that.

It was developed by a community member, then officially recognized by SmartThings so there’s a one button install process.

Lightweight browser client, so works on most phones and tablets. Very popular, you’ll find a lot of discussion in the forums. (It was previously called actiON)

1 Like

Thanks. Yeah I am already using the SmartTiles. While it’s a great app, it’s not quite what I need for this particular item.

I’ve also tried changing background images for the tile. Would be great to just dynamically change the On/Off wording so I have 1 custom device type for 8 tiles

1 Like

Yeah, I wish we could easily define display labels!

Have you tried using the transparent icon trick? Or does that not fit the use case either?

Yeah I’ve tried that too. That would be acceptable for sure, but the backgrounds wouldn’t take. I saw some other people in the thread were having trouble too.

Would be nice if something like label: "${device.displayName}" worked, then I’d be all set :smile:

4 Likes

this is exactly what i’d like to do. Anyone come up with a work around to include the device name in the label?