Why isn’t the tile displaying transitioning state background blue color #2179b8?
I am trying to match the tile operational technique exactly that @ChadCK and @johnconstantelo did on the Z-Wave Smart Fan Control Custom Device Handler I must not be understanding the correct syntax on the state parameters?
On the GE Smart Fan device code below it works perfectly if I tap any standard speed tile, the background changes to blue simultaneously as the main multiAttribute tile changes to blue/ADJUSTING while it changes speed that I just pressed.
multiAttributeTile(name: "switch", type: "lighting", width: 6, height: 4, canChangeIcon: true) {
tileAttribute ("device.currentState", key: "PRIMARY_CONTROL") {
attributeState "default", label:'ADJUSTING', action:"refresh.refresh", icon:"st.Lighting.light24", backgroundColor:"#2179b8", nextState: "turningOff"
attributeState "HIGH", label:'HIGH', action:"switch.off", icon:"st.Lighting.light24", backgroundColor:"#486e13", nextState: "turningOff"
attributeState "MED", label:'MED', action:"switch.off", icon:"st.Lighting.light24", backgroundColor:"#60931a", nextState: "turningOff"
attributeState "LOW", label:'LOW', action:"switch.off", icon:"st.Lighting.light24", backgroundColor:"#79b821", nextState: "turningOff"
attributeState "OFF", label:'OFF', action:"switch.on", icon:"st.Lighting.light24", backgroundColor:"#ffffff", nextState: "turningOn"
attributeState "turningOn", action:"switch.on", label:'TURNINGON', icon:"st.Lighting.light24", backgroundColor:"#2179b8", nextState: "turningOn"
attributeState "turningOff", action:"switch.off", label:'TURNINGOFF', icon:"st.Lighting.light24", backgroundColor:"#2179b8", nextState: "turningOff"
}
tileAttribute ("device.level", key: "SECONDARY_CONTROL") {
attributeState "level", label:'${currentValue}%'F
}
}
standardTile("lowSpeed", "device.currentState", inactiveLabel: false, width: 2, height: 2) {
state "default", label: 'LOW', action: "lowSpeed", icon:"st.Home.home30", backgroundColor: "#ffffff"
state "LOW", label:'LOW', action: "lowSpeed", icon:"st.Home.home30", backgroundColor: "#79b821"
state "ADJUSTING.LOW", label:'LOW', action: "lowSpeed", icon:"st.Home.home30", backgroundColor: "#2179b8"
}
standardTile("medSpeed", "device.currentState", inactiveLabel: false, width: 2, height: 2) {
state "default", label: 'MED', action: "medSpeed", icon:"st.Home.home30", backgroundColor: "#ffffff"
state "MED", label: 'MED', action: "medSpeed", icon:"st.Home.home30", backgroundColor: "#79b821"
state "ADJUSTING.MED", label:'MED', action: "medSpeed", icon:"st.Home.home30", backgroundColor: "#2179b8"
}
standardTile("highSpeed", "device.currentState", inactiveLabel: false, width: 2, height: 2) {
state "default", label: 'HIGH', action: "highSpeed", icon:"st.Home.home30", backgroundColor: "#ffffff"
state "HIGH", label: 'HIGH', action: "highSpeed", icon:"st.Home.home30", backgroundColor: "#79b821"
state "ADJUSTING.HIGH", label:'HIGH', action: "highSpeed", icon:"st.Home.home30", backgroundColor: "#2179b8"
On my code to mimic this behavior above I do not get any of the blue changing transitioning backgrounds when I tap the standard tiles? When I try to modify the line with [state "ADJUSTING…] I can totally freeze up states being displayed on the device properly. What am I misunderstanding below? (Sorry for clutter of comments but I have it in as I learning what the parts of the code are) The commented out states are things I was trying that totally don’t work.
tiles(scale: 2) {
// FAN SWITCH multiple attributes tile with actions named
multiAttributeTile(name: "switch", type: "lighting", width: 6, height: 4, canChangeIcon: true) {
// All tiles must define a PRIMARY_CONTROL. Controls the background color of tile, and specifies the attribute to show on the Device list views
tileAttribute ("device.fanMode", key: "PRIMARY_CONTROL") {
//We can use the nextState option in state (single-attribute tiles) or attributeState (Multi-Attribute Tiles) to show
//that the device is transitioning to a next state. This is useful to provide visual feedback that the device state is transitioning.
//When the attribute’s state does change, the tile will be updated according to the state defined for that attribute.
//To define a transition state, simply define a state for the transition, and reference that state using the nextState option.
attributeState "default", label:'ADJUSTING', action:"refresh.refresh", icon:"st.Lighting.light24", backgroundColor:"#2179b8", nextState: "turningOff" //light blue bckgrd
attributeState "fanFour", label:'HIGH', action:"fanOff", icon:"st.Lighting.light24", backgroundColor:"#486e13", nextState: "turningOff" // green4 bckgrnd
attributeState "fanThree", label: 'MED-HI', action:"fanOff", icon:"st.Lighting.light24", backgroundColor:"#558216", nextState: "turningOff" //green3 bckground
attributeState "fanTwo", label: 'MED', action:"fanOff", icon:"st.Lighting.light24", backgroundColor:"#669c1c", nextState: "turningOff" //green2 bckground
attributeState "fanOne", label:'LOW', action:"fanOff", icon:"st.Lighting.light24", backgroundColor:"#79b821", nextState: "turningOff" //green1 bckgrnd
attributeState "fanAuto", label:"BREEZE", action:"fanOff", icon:"st.Lighting.light24", backgroundColor:"#00A0DC", nextState: "turningOff" //blue bckgrd
attributeState "fanOff", label:"FAN OFF", action:"fanOne", icon:"st.Lighting.light24", backgroundColor:"#ffffff", nextState: "turningOn" //gray bckgrnd
attributeState "turningOn", action:"fanOne", label:"TURNINGON", icon:"st.Lighting.light24", backgroundColor:"#2179b8", nextState: "turningOn" //light blue bckgrd
attributeState "turningOff", action:"fanOff", label:"TURNINGOFF", icon:"st.Lighting.light24", backgroundColor:"#2179b8", nextState: "turningOff" //light blue bckgrd
}
// LIGHT control dimmer tile with slider actions
tileAttribute ("device.level", key: "SLIDER_CONTROL") {
attributeState "level", action:"switch level.setLevel"
}
}
// LIGHT standard flat tile with actions
standardTile("fanLight", "device.switch", width: 2, height: 2, decoration: "flat") {
state "off", label:'${name}', action: "switch.on",
icon:"https://raw.githubusercontent.com/dcoffing/SmartThingsPublic/master/devicetypes/dcoffing/hampton-bay-universal-ceiling-fan-light-controller.src/Light175xfinal.png", backgroundColor: "#ffffff" //, nextState:"turningOn"
state "on", label:'${name}', action: "switch.off",
icon:"https://raw.githubusercontent.com/dcoffing/SmartThingsPublic/master/devicetypes/dcoffing/hampton-bay-universal-ceiling-fan-light-controller.src/Light175xfinal.png", backgroundColor: "#79b821" //, nextState:"turningOff"
// state "turningOn", label:'Turning on', icon:"https://raw.githubusercontent.com/dcoffing/SmartThingsPublic/master/devicetypes/dcoffing/hampton-bay-universal-ceiling-fan-light-controller.src/Light175xfinal.png", backgroundColor:"#79b821", nextState: "turningOff"
// state "turningOff", label:'Turning off', icon:"https://raw.githubusercontent.com/dcoffing/SmartThingsPublic/master/devicetypes/dcoffing/hampton-bay-universal-ceiling-fan-light-controller.src/Light175xfinal.png", backgroundColor:"#ffffff", nextState: "turningOn"
}
// fanSPEED standard tile with actions
standardTile("fanOne", "device.fanMode", inactiveLabel: false, width: 2, height: 2) {
state "default", label: 'LOW', action: "fanOne", icon:"https://raw.githubusercontent.com/dcoffing/SmartThingsPublic/master/devicetypes/dcoffing/hampton-bay-universal-ceiling-fan-light-controller.src/Fan175xfinal.png", backgroundColor: "#ffffff"
state "fanOne", label:'LOW', action: "fanOne", icon:"https://raw.githubusercontent.com/dcoffing/SmartThingsPublic/master/devicetypes/dcoffing/hampton-bay-universal-ceiling-fan-light-controller.src/Fan175xfinal.png", backgroundColor: "#79b821"
// state "turningTwo", label:'ADJ MED', action: "fanTwo", icon:"https://raw.githubusercontent.com/dcoffing/SmartThingsPublic/master/devicetypes/dcoffing/hampton-bay-universal-ceiling-fan-light-controller.src/Fan175xfinal.png", backgroundColor: "#2179b8"
// state "ADJUSTING.LOW", label:'LOW', action: "lowSpeed", icon:"st.Home.home30", backgroundColor: "#2179b8"
state "ADJUSTING.fanOne", label:'ADJ_LOW', action: "fanOne", icon:"st.Home.home30", backgroundColor: "#2179b8"
}
standardTile("fanTwo", "device.fanMode", inactiveLabel: false, width: 2, height: 2) {
state "default", label: 'MED', action: "fanTwo", icon:"https://raw.githubusercontent.com/dcoffing/SmartThingsPublic/master/devicetypes/dcoffing/hampton-bay-universal-ceiling-fan-light-controller.src/Fan175xfinal.png", backgroundColor: "#ffffff"
state "fanTwo", label: 'MED', action: "fanTwo", icon:"https://raw.githubusercontent.com/dcoffing/SmartThingsPublic/master/devicetypes/dcoffing/hampton-bay-universal-ceiling-fan-light-controller.src/Fan175xfinal.png", backgroundColor: "#79b821"
// state "turningThree", label:'ADJ MED-HI', action: "fanThree", icon:"https://raw.githubusercontent.com/dcoffing/SmartThingsPublic/master/devicetypes/dcoffing/hampton-bay-universal-ceiling-fan-light-controller.src/Fan175xfinal.png", backgroundColor: "#2179b8"
// state "ADJUSTING.MED", label:'MED', action: "medSpeed", icon:"st.Home.home30", backgroundColor: "#2179b8"
// state "ADJUSTING.MED", label:'MED', action: "fanTwo", icon:"st.Home.home30", backgroundColor: "#2179b8"
}
standardTile("fanThree", "device.fanMode", inactiveLabel: false, width: 2, height: 2) {
state "default", label: 'MED-HI', action: "fanThree", icon:"https://raw.githubusercontent.com/dcoffing/SmartThingsPublic/master/devicetypes/dcoffing/hampton-bay-universal-ceiling-fan-light-controller.src/Fan175xfinal.png", backgroundColor: "#ffffff"
state "fanThree", label: 'MED-HI', action: "fanThree", icon:"https://raw.githubusercontent.com/dcoffing/SmartThingsPublic/master/devicetypes/dcoffing/hampton-bay-universal-ceiling-fan-light-controller.src/Fan175xfinal.png", backgroundColor: "#79b821"
// state "turningThree", label:'ADJ MED-HI', action: "fanThree", icon:"https://raw.githubusercontent.com/dcoffing/SmartThingsPublic/master/devicetypes/dcoffing/hampton-bay-universal-ceiling-fan-light-controller.src/Fan175xfinal.png", backgroundColor: "#2179b8"
// state "ADJUSTING.MED-HI", label:'MED-HI', action: "fanThree", icon:"st.Home.home30", backgroundColor: "#2179b8"
}