Actually that didnât quite work. Change to this:
// Colour Shortcuts:
standardTile("red", "device.colorName", height: 2, width: 2, decoration: "flat", inactiveLabel: false, canChangeIcon: false) {
state "off", label:"red", action:"red", icon:"st.illuminance.illuminance.dark", backgroundColor:"#D8D8D8", defaultState: true
state "red", label:"red", action:"off", icon:"st.illuminance.illuminance.bright", backgroundColor:"#FF0000"
}
standardTile("green", "device.colorName", height: 2, width: 2, decoration: "flat", inactiveLabel: false, canChangeIcon: false) {
state "off", label:"green", action:"green", icon:"st.illuminance.illuminance.dark", backgroundColor:"#D8D8D8", defaultState: true
state "green", label:"green", action:"off", icon:"st.illuminance.illuminance.bright", backgroundColor:"#00FF00"
}
standardTile("blue", "device.colorName", height: 2, width: 2, decoration: "flat", inactiveLabel: false, canChangeIcon: false) {
state "off", label:"blue", action:"blue", icon:"st.illuminance.illuminance.dark", backgroundColor:"#D8D8D8", defaultState: true
state "blue", label:"blue", action:"off", icon:"st.illuminance.illuminance.bright", backgroundColor:"#0000FF"
}
standardTile("cyan", "device.colorName", height: 2, width: 2, decoration: "flat", inactiveLabel: false, canChangeIcon: false) {
state "off", label:"cyan", action:"cyan", icon:"st.illuminance.illuminance.dark", backgroundColor:"#D8D8D8", defaultState: true
state "cyan", label:"cyan", action:"off", icon:"st.illuminance.illuminance.bright", backgroundColor:"#00FFFF"
}
standardTile("magenta", "device.colorName", height: 2, width: 2, decoration: "flat", inactiveLabel: false, canChangeIcon: false) {
state "off", label:"magenta", action:"magenta", icon:"st.illuminance.illuminance.dark", backgroundColor:"#D8D8D8", defaultState: true
state "magenta", label:"magenta", action:"off", icon:"st.illuminance.illuminance.bright", backgroundColor:"#FF0040"
}
standardTile("orange", "device.colorName", height: 2, width: 2, decoration: "flat", inactiveLabel: false, canChangeIcon: false) {
state "off", label:"orange", action:"orange", icon:"st.illuminance.illuminance.dark", backgroundColor:"#D8D8D8", defaultState: true
state "orange", label:"orange", action:"off", icon:"st.illuminance.illuminance.bright", backgroundColor:"#FF6600"
}
standardTile("purple", "device.colorName", height: 2, width: 2, decoration: "flat", inactiveLabel: false, canChangeIcon: false) {
state "off", label:"purple", action:"purple", icon:"st.illuminance.illuminance.dark", backgroundColor:"#D8D8D8", defaultState: true
state "purple", label:"purple", action:"off", icon:"st.illuminance.illuminance.bright", backgroundColor:"#BF00FF"
}
standardTile("yellow", "device.colorName", height: 2, width: 2, decoration: "flat", inactiveLabel: false, canChangeIcon: false) {
state "off", label:"yellow", action:"yellow", icon:"st.illuminance.illuminance.dark", backgroundColor:"#D8D8D8", defaultState: true
state "yellow", label:"yellow", action:"off", icon:"st.illuminance.illuminance.bright", backgroundColor:"#FFFF00"
}
standardTile("pink", "device.colorName", height: 2, width: 2, decoration: "flat", inactiveLabel: false, canChangeIcon: false) {
state "off", label:"pink", action:"pink", icon:"st.illuminance.illuminance.dark", backgroundColor:"#D8D8D8", defaultState: true
state "pink", label:"pink", action:"off", icon:"st.illuminance.illuminance.bright", backgroundColor:"#FF33CB"
}
standardTile("white", "device.colorName", height: 2, width: 2, decoration: "flat", inactiveLabel: false, canChangeIcon: false) {
state "off", label:"white", action:"white", icon:"st.illuminance.illuminance.dark", backgroundColor:"#D8D8D8", defaultState: true
state "white", label:"white", action:"off", icon:"st.illuminance.illuminance.bright", backgroundColor:"#FF33CB"
}
standardTile("coldWhite", "device.colorName", height: 2, width: 2, decoration: "flat", inactiveLabel: false, canChangeIcon: false) {
state "off", label:"coldWhite", action:"coldWhite", icon:"st.illuminance.illuminance.dark", backgroundColor:"#D8D8D8", defaultState: true
state "coldWhite", label:"coldWhite", action:"off", icon:"st.illuminance.illuminance.bright", backgroundColor:"#FF33CB"
}
standardTile("warmWhite", "device.colorName", height: 2, width: 2, decoration: "flat", inactiveLabel: false, canChangeIcon: false) {
state "off", label:"warmWhite", action:"warmWhite", icon:"st.illuminance.illuminance.dark", backgroundColor:"#D8D8D8", defaultState: true
state "warmWhite", label:"warmWhite", action:"off", icon:"st.illuminance.illuminance.bright", backgroundColor:"#FF33CB"
}
standardTile("refresh", "device.switch", inactiveLabel: false, decoration: "flat", width: 2, height: 2) {
state "default", label:"", action:"refresh.refresh", icon:"st.secondary.refresh"
}
standardTile("test", "device.switch", decoration: "flat", width: 2, height: 2) {
state "default", label:'Test', action:"test"
}
// Tile layouts:
// ******** EDIT THIS SECTION to show the Tiles you want ********
main(["switch"])
details([
// The main multitile:
"switch",
// RGBW Channels:
"switchRed","levelRedSlider", "levelRedTile",
"switchGreen","levelGreenSlider", "levelGreenTile",
"switchBlue","levelBlueSlider", "levelBlueTile",
"switchWhite","levelWhiteSlider", "levelWhiteTile",
// OUT Channels:
//"switchCh1","levelCh1Slider", "levelCh1Tile",
//"switchCh2","levelCh2Slider", "levelCh2Tile",
//"switchCh3","levelCh3Slider", "levelCh3Tile",
//"switchCh4","levelCh4Slider", "levelCh4Tile",
// INPUT Channels (read-only, label replaced slider control):
//"switchCh1ReadOnly", "ch1Label", "levelCh1Tile",
//"switchCh2ReadOnly", "ch2Label", "levelCh2Tile",
//"switchCh3ReadOnly", "ch3Label", "levelCh3Tile",
//"switchCh4ReadOnly", "ch4Label", "levelCh4Tile",
// Energy and Power:
"powerLabel", "power", "refresh", "lastReset", "energy",
// Built-in Program Shortcuts (these only work if the channels are RGBW):
"fireplace", "storm", "deepFade","liteFade", "police",
// Color Shortcut Tiles (these only work if channels are mapped to red/green/blue/white):
"red","green","blue",
"orange","yellow","cyan",
"magenta","pink","purple",
"white", "warmWhite", "coldWhite"