Update tiles

This commit is contained in:
Matt Nohr
2015-08-19 13:33:45 -05:00
parent d2fc763a0e
commit 5ceb48647e

View File

@@ -23,36 +23,28 @@ metadata {
// TODO: define status and reply messages here // TODO: define status and reply messages here
} }
standardTile("switch", "device.switch", width: 2, height: 2, canChangeIcon: true) { tiles (scale: 2){
state "on", label:'${name}', action:"switch.off", icon:"st.lights.philips.hue-single", backgroundColor:"#79b821" multiAttributeTile(name:"switch", type: "lighting", width: 6, height: 4, canChangeIcon: true){
state "off", label:'${name}', action:"switch.on", icon:"st.lights.philips.hue-single", backgroundColor:"#ffffff" tileAttribute ("device.switch", key: "PRIMARY_CONTROL") {
} attributeState "on", label:'${name}', action:"switch.off", icon:"st.lights.philips.hue-single", backgroundColor:"#79b821", nextState:"turningOff"
standardTile("reset", "device.reset", inactiveLabel: false, decoration: "flat") { attributeState "off", label:'${name}', action:"switch.on", icon:"st.lights.philips.hue-single", backgroundColor:"#ffffff", nextState:"turningOn"
state "default", label:"Color Reset", action:"reset", icon:"st.lights.philips.hue-single" attributeState "turningOn", label:'${name}', action:"switch.off", icon:"st.lights.philips.hue-single", backgroundColor:"#79b821", nextState:"turningOff"
} attributeState "turningOff", label:'${name}', action:"switch.on", icon:"st.lights.philips.hue-single", backgroundColor:"#ffffff", nextState:"turningOn"
standardTile("refresh", "device.switch", inactiveLabel: false, decoration: "flat") { }
state "default", label:"", action:"refresh.refresh", icon:"st.secondary.refresh" tileAttribute ("device.level", key: "SLIDER_CONTROL") {
} attributeState "level", action:"switch level.setLevel"
controlTile("rgbSelector", "device.color", "color", height: 3, width: 3, inactiveLabel: false) { }
state "color", action:"setAdjustedColor" tileAttribute ("device.color", key: "COLOR_CONTROL") {
} attributeState "color", action:"setAdjustedColor"
controlTile("levelSliderControl", "device.level", "slider", height: 1, width: 2, inactiveLabel: false, range:"(0..100)") { }
state "level", action:"switch level.setLevel" }
}
valueTile("level", "device.level", inactiveLabel: false, decoration: "flat") { standardTile("reset", "device.reset", inactiveLabel: false, decoration: "flat", width: 2, height: 2) {
state "level", label: 'Level ${currentValue}%' state "default", label:"Reset Color", action:"reset", icon:"st.lights.philips.hue-single"
} }
controlTile("saturationSliderControl", "device.saturation", "slider", height: 1, width: 2, inactiveLabel: false) { standardTile("refresh", "device.switch", inactiveLabel: false, decoration: "flat", width: 2, height: 2) {
state "saturation", action:"color control.setSaturation" state "default", label:"", action:"refresh.refresh", icon:"st.secondary.refresh"
} }
valueTile("saturation", "device.saturation", inactiveLabel: false, decoration: "flat") {
state "saturation", label: 'Sat ${currentValue} '
}
controlTile("hueSliderControl", "device.hue", "slider", height: 1, width: 2, inactiveLabel: false) {
state "hue", action:"color control.setHue"
}
valueTile("hue", "device.hue", inactiveLabel: false, decoration: "flat") {
state "hue", label: 'Hue ${currentValue} '
} }
main(["switch"]) main(["switch"])