The control icons can also have colors (as in my Circadian tile) and the text can change based on state. Color can / should change. Usually white for off and blue (SmartThings standard) for on.
tiles(scale:2) {
multiAttributeTile(name:“switch”, type: “lighting”, width: 6, height: 4, canChangeIcon: true){
tileAttribute (“device.switch”, key: “PRIMARY_CONTROL”) {
attributeState “on”, label:’${name}’, action:“switch.off”, icon:“st.switches.light.on”, backgroundColor:"#00a0dc",
nextState:“waiting"
attributeState “off”, label:’${name}’, action:“switch.on”, icon:“st.switches.light.off”, backgroundColor:”#ffffff",
nextState:“waiting"
attributeState “waiting”, label:’${name}’, action:“switch.on”, icon:“st.switches.light.on”, backgroundColor:”#15EE10",
nextState:“on"
attributeState “commsError”, label:‘Comms Error’, action:“switch.on”, icon:“st.switches.switch.off”, backgroundColor:”#e86d13",
nextState:“on”
}
tileAttribute (“device.level”, key: “SLIDER_CONTROL”) {
attributeState “level”, label: “Brightness: ${currentValue}”, action:“switch level.setLevel”
}
tileAttribute (“device.color”, key: “COLOR_CONTROL”) {
attributeState “color”, action:“setColor”
}
}
controlTile(“colorTempSliderControl”, “device.colorTemperature”, “slider”, width: 4, height: 1, inactiveLabel: false,
range:"(2500…9000)") {
state “colorTemperature”, action:“color temperature.setColorTemperature”
}
valueTile(“colorTemp”, “device.colorTemperature”, inactiveLabel: false, decoration: “flat”, height: 1, width: 2) {
state “colorTemp”, label: ‘${currentValue}K’
}
standardTile(“bulbMode”, “bulbMode”, width: 2, height: 1, decoration: “flat”) {
state “normal”, label:‘Normal Mode’, action:“setModeCircadian”, backgroundColor:"#ffffff", nextState: “circadian"
state “circadian”, label:‘Circadian Mode’, action:“setModeNormal”, backgroundColor:”#00a0dc", nextState: “normal”
}
standardTile(“refresh”, “capability.refresh”, width: 2, height: 1, decoration: “flat”) {
state (“default”, label:“Refresh”, action:“refresh.refresh”, backgroundColor:"#ffffff")
}
standardTile(“refreshStats”, “Refresh Statistics”, width: 2, height: 1, decoration: “flat”) {
state (“refreshStats”, label:“Refresh Stats”, action:“setCurrentDate”, backgroundColor:"#ffffff")
}
valueTile(“power”, “device.power”, decoration: “flat”, height: 1, width: 2) {
state “power”, label: ‘Current Power \n\r ${currentValue} W’
}
valueTile(“engrToday”, “device.engrToday”, decoration: “flat”, height: 1, width: 2) {
state “engrToday”, label: ‘Todays Usage\n\r${currentValue} KWH’
}
valueTile(“monthTotal”, “device.monthTotalE”, decoration: “flat”, height: 1, width: 2) {
state “monthTotalE”, label: ‘30 Day Total\n\r ${currentValue} KWH’
}
valueTile(“monthAverage”, “device.monthAvgE”, decoration: “flat”, height: 1, width: 2) {
state “monthAvgE”, label: ‘30 Day Avg\n\r ${currentValue} KWH’
}
valueTile(“weekTotal”, “device.weekTotalE”, decoration: “flat”, height: 1, width: 2) {
state “weekTotalE”, label: ‘7 Day Total\n\r ${currentValue} KWH’
}
valueTile(“weekAverage”, “device.weekAvgE”, decoration: “flat”, height: 1, width: 2) {
state “weekAvgE”, label: ‘7 Day Avg\n\r ${currentValue} KWH’
}
main(“switch”)
details(“switch”, “colorTempSliderControl”, “colorTemp”, “power”, “weekTotal”, “monthTotal”, “engrToday”, “weekAverage”, “monthAverage”, “bulbMode”, “refresh” ,“refreshStats”)
}
}