[RELEASE] Value Tiles - DTH for displaying webCoRE variables / Stats in a 'Thing'


#63

I installed the device handler
how do i create a simulated device using that handler.?


#64

In the IDE, go to ‘my devices’ and then click ‘+ new device’.

The rest is fairly straightforward, give it a random device ID and choose the new custom handler as the ‘type’

fyi… custom handlers always group together at the very bottom of the ‘type’ drop-down list.


#65

I may have taken my personal versions of this DTH a little bit too far lol… this one is for overall climate control:

Fan switches, modes and temperature settings all work… it’s like my own mini version of actiontiles, but inside the ST app.

This one controls individual fans, allowing me to set the humidity required to trigger the fan and how long it should run for after the humidity drops. Also if I want Fan triggered by the light turning on instead:

This one gives an overview of various statuses in the home, text changes as applicable:



#66

how can i get the data out of here on tile i trying to remove email part and display it on a tile

image


#67


#68

is there a way to bold text in a st tile


#69

no… not possible.

You can form new lines witin a tile though, but has to be hard coded in the device handler, not sent from webCoRE.

add \n between line 1 and line 2

state "default", label:'Some Title: \n${currentValue}'


#70

Animated examples of what can be done with variations of value tiles:


#71

Hi I have been looking at this
I Have a question about the DTH
on the fist screen before you tap you see device name
what would i need to change for that to be what every value1 is


#72

You need to choose the name of the device you have the valuetiles DTH assigned to…

In the example gif i shared a few posts up, my device was called ‘A Summary’


#73

I All I have an idea i need help with I known i will have to change the dth
i went the first two panels to be a normal on off switch
how can i do that?
thanks


#74

Here you go:


#75

thanks i only need one switch i fixed that but spacing looks odd
metadata {
definition (name: “webCoRE Value Ties - With Two Switches”, namespace: “RobinWinbourne”, author: “Robin Winbourne”) {
capability “Actuator”
capability “Switch”

    attribute "switch2","string"
    attribute "Value1","string"
    attribute "Value2","string"
    attribute "Value3","string"
    attribute "Value4","string"
    attribute "Value5","string"

    command "on2"
    command "off2"
    command "changeValue1"
    command "changeValue2"
    command "changeValue3"
    command "changeValue4"
    command "changeValue5"
}
tiles (scale: 2){
    standardTile("switch", "device.switch", width: 3, height: 3, decoration: "flat", inactiveLabel: false, canChangeIcon: false, canChangeBackground: true) {
        state "on", label: "On", action: "switch.off", icon: "st.Home.home30", backgroundColor: "#66ccff"
        state "off", label: "Off", action: "switch.on", icon: "st.Home.home30", backgroundColor: "#FFFFFF"
    }

    
    valueTile("Value1", "device.Value1", width: 6, height: 2) {
        state "default", label:'${currentValue}'
    }
    valueTile("Value2", "device.Value2", width: 6, height: 2) {
        state "default", label:'${currentValue}'
    }
    valueTile("Value3", "device.Value3", width: 6, height: 2) {
        state "default", label:'${currentValue}'
    }
    valueTile("Value4", "device.Value4", width: 6, height: 2) {
        state "default", label:'${currentValue}'
    }
    valueTile("Value5", "device.Value5", width: 6, height: 2) {
        state "default", label:'${currentValue}'
    }
    main(["switch"])
    details(["switch","Value1","Value2","Value3","Value4","Value5"])
}

}

def on() {
sendEvent(name: “switch”, value: “on”)
}
def off() {
sendEvent(name: “switch”, value: “off”)
}
def changeValue1 (param1) {
sendEvent(“name”:“Value1”, “value”:param1)
}
def changeValue2 (param2) {
sendEvent(“name”:“Value2”, “value”:param2)
}
def changeValue3 (param3) {
sendEvent(“name”:“Value3”, “value”:param3)
}
def changeValue4 (param4) {
sendEvent(“name”:“Value4”, “value”:param4)
}
def changeValue5 (param5) {
sendEvent(“name”:“Value5”, “value”:param5)
}


#76

Just change height and width of each tile till it looks right.

The page is a grid, 6 sections wide:

https://docs.smartthings.com/en/latest/_images/grid-layout.png


#77

This is awesome! Can you please share the DTH for D - Guest Fan as well as A Summary T&H? That would be a nice template to use to start building :slight_smile:


#78

Summary T&H:

metadata {
    definition (name: "Summary - Temperature and Humidity", namespace: "Robin", author: "Robin Winbourne") {
        capability "Actuator"
        capability "Switch"

        attribute "valueTemp1","string"
        attribute "valueHumidity1","string"
        attribute "fan1","string"
        attribute "mode1","string"
        attribute "valueTemp2","string"
        attribute "valueHumidity2","string"
        attribute "fan2","string"
        attribute "mode2","string"
        attribute "valueTemp3","string"
        attribute "valueHumidity3","string"
        attribute "fan3","string"
        attribute "mode3","string"
        attribute "valueTemp4","string"
        attribute "valueHumidity4","string"
        attribute "fan4","string"
        attribute "mode4","string"
        attribute "valueTemp5","string"
        attribute "valueHumidity5","string"
        attribute "fan5","string"
        attribute "mode5","string"
        attribute "valueTemp6","string"
        attribute "level6","string"
        attribute "fan6","string"
        attribute "mode6","string"
        attribute "valueTemp7","string"
        attribute "level7","string"
        attribute "fan7","string"
        attribute "mode7","string"
        attribute "valueTemp8","string"
        attribute "level8","string"
        attribute "fan8","string"
        attribute "mode8","string"
        attribute "valueTemp9","string"
        attribute "valueHumidity9","string"
        attribute "fan9","string"
        attribute "mode9","string"

        command "changevalueTemp1"
        command "changevalueHumidity1"
        command "changevalueFan1"
        command "fan1On"
        command "fan1Off"
        command "changevalueMode1"
        command "mode1Manual"
        command "mode1Light"
        command "mode1Humidity"
        
        command "changevalueTemp2"
        command "changevalueHumidity2"
        command "changevalueFan2"
        command "fan2On"
        command "fan2Off"
        command "changevalueMode2"
        command "mode2Manual"
        command "mode2Light"
        command "mode2Humidity"
        
        command "changevalueTemp3"
        command "changevalueHumidity3"
        command "changevalueFan3"
        command "fan3On"
        command "fan3Off"
        command "changevalueMode3"
        command "mode3Manual"
        command "mode3Light"
        command "mode3Humidity"
        
        command "changevalueTemp4"
        command "changevalueHumidity4"
        command "changevalueFan4"
        command "fan4On"
        command "fan4Off"
        command "changevalueMode4"
        command "mode4Manual"
        command "mode4Light"
        command "mode4Humidity"
        
        command "changevalueTemp5"
        command "changevalueHumidity5"
        command "changevalueFan5"
        command "fan5On"
        command "fan5Off"
        command "changevalueMode5"
        command "mode5Manual"
        command "mode5Light"
        command "mode5Humidity"
        
        command "changevalueTemp6"
        command "changevalueLevel6"
        command "changevalueFan6"
        command "fan6On"
        command "fan6Off"
        command "changevalueMode6"
        command "mode6Heat"
        command "mode6Cool"
        command "mode6Fan"
        command "mode6Dry"
        command "mode6Auto"
        
        command "changevalueTemp7"
        command "changevalueLevel7"
        command "changevalueFan7"
        command "fan7On"
        command "fan7Off"
        command "changevalueMode7"
        command "mode7Heat"
        command "mode7Cool"
        command "mode7Fan"
        command "mode7Dry"
        command "mode7Auto"
        
        command "changevalueTemp8"
        command "changevalueLevel8"
        command "changevalueFan8"
        command "fan8On"
        command "fan8Off"
        command "changevalueMode8"
        command "mode8Heat"
        command "mode8Cool"
        command "mode8Fan"
        command "mode8Dry"
        command "mode8Auto"
        
        command "changevalueTemp9"
        command "changevalueHumidity9"
        command "changevalueFan9"
        command "fan9On"
        command "fan9Off"
        command "changevalueMode9"
        command "mode9Manual"
        command "mode9Light"
        command "mode9Humidity"

    }
    tiles (scale: 2){
        standardTile("titleIcon", "device.titleIcon", width: 2, height: 1, canChangeBackground: true) {
            state "default"
        }
        standardTile("titleTemp", "device.titleTemp", inactiveLabel: false, width: 1, height: 1, decoration: "flat", wordWrap: true) {
            state "default", label:'Temperature', icon: "st.Weather.weather2"
        }
        standardTile("titleHumidity", "device.titleHumidity", inactiveLabel: false, width: 1, height: 1, decoration: "flat", wordWrap: true) {
            state "default", label:'Humidity', icon: "st.Weather.weather12"
        }
        standardTile("titleFan", "device.titleFan", inactiveLabel: false, width: 1, height: 1, decoration: "flat", wordWrap: true) {
            state "default", label:'Status', icon: "st.samsung.da.RAC_4line_02_ic_fan"
        }
        standardTile("titleMode", "device.titleMode", inactiveLabel: false, width: 1, height: 1, decoration: "flat", wordWrap: true) {
            state "default", label:'Mode', icon: "st.tesla.tesla-hvac"
        }
        valueTile("titleRoom1", "device.titleRoom1", inactiveLabel: false, width: 2, height: 1, decoration: "flat", wordWrap: true) {
            state "default", label:'Upstairs Bathroom'
        }
        valueTile("valueTemp1", "device.valueTemp1", inactiveLabel: true, width: 1, height: 1, decoration: "flat", wordWrap: true) {
            state ("default", label:'${currentValue}\u00b0', backgroundColors:[
                [value: "error", color: "#ff0000"],
                [value: 0, color: "#153591"],
                [value: 7, color: "#1e9cbb"],
                [value: 15, color: "#90d2a7"],
                [value: 23, color: "#44b621"],
                [value: 28, color: "#f1d801"],
                [value: 35, color: "#d04e00"],
                [value: 37, color: "#bc2323"]
            ]
                  )
        }
        valueTile("valueHumidity1", "device.valueHumidity1", inactiveLabel: false, width: 1, height: 1, decoration: "flat", wordWrap: true) {
            state ("default", label:'${currentValue}%', backgroundColors:[
                [value: "error", color: "#ff0000"],
                [value: 20, color: "#153591"],
                [value: 30, color: "#1e9cbb"],
                [value: 40, color: "#90d2a7"],
                [value: 50, color: "#44b621"],
                [value: 60, color: "#f1d801"],
                [value: 70, color: "#d04e00"],
                [value: 80, color: "#bc2323"]                                      
            ]
                  )
        }
        standardTile("fan1", "device.fan1", inactiveLabel: false, width: 1, height: 1, decoration: "flat", wordWrap: true) {
            state "off", label: '', action: 'fan1On', icon: "st.thermostat.fan-off", backgroundColor: "#ffffff", nextState:"on"
            state "on", label: '', action: 'fan1Off', icon: "st.thermostat.fan-on" , backgroundColor: "#ff9900", nextState:"off"
        }
        standardTile("mode1", "device.mode1", inactiveLabel: false, width: 1, height: 1, decoration: "flat", wordWrap: true) {
            state "humidityMode", label: "Humidity", action: "mode1Light", icon: "st.Weather.weather12", backgroundColor: "#00a0dc", nextState:"lightMode"
            state "lightMode", label: "Light", action: "mode1Manual", icon: "st.Lighting.light11", backgroundColor: "#f1d801", nextState:"manualMode"
            state "manualMode", label: "Manual", action: "mode1Humidity", icon: "st.sonos.pause-icon", backgroundColor: "#FFFFFF", nextState:"humidityMode"
        }
        valueTile("titleRoom2", "device.titleRoom2", inactiveLabel: false, width: 2, height: 1, decoration: "flat", wordWrap: true) {
            state "default", label:'Master En-Suite'
        }
        valueTile("valueTemp2", "device.valueTemp2", inactiveLabel: true, width: 1, height: 1, decoration: "flat", wordWrap: true) {
            state ("default", label:'${currentValue}\u00b0', backgroundColors:[
                [value: "error", color: "#ff0000"],
                [value: 0, color: "#153591"],
                [value: 7, color: "#1e9cbb"],
                [value: 15, color: "#90d2a7"],
                [value: 23, color: "#44b621"],
                [value: 28, color: "#f1d801"],
                [value: 35, color: "#d04e00"],
                [value: 37, color: "#bc2323"]
            ]
                  )
        }
        valueTile("valueHumidity2", "device.valueHumidity2", inactiveLabel: false, width: 1, height: 1, decoration: "flat", wordWrap: true) {
            state ("default", label:'${currentValue}%', backgroundColors:[
                [value: "error", color: "#ff0000"],
                [value: 20, color: "#153591"],
                [value: 30, color: "#1e9cbb"],
                [value: 40, color: "#90d2a7"],
                [value: 50, color: "#44b621"],
                [value: 60, color: "#f1d801"],
                [value: 70, color: "#d04e00"],
                [value: 80, color: "#bc2323"]                                      
            ]
                  )
        }
        standardTile("fan2", "device.fan2", inactiveLabel: false, width: 1, height: 1, decoration: "flat", wordWrap: true) {
            state "off", label: '', action: 'fan2On', icon: "st.thermostat.fan-off", backgroundColor: "#ffffff", nextState:"on"
            state "on", label: '', action: 'fan2Off', icon: "st.thermostat.fan-on" , backgroundColor: "#ff9900", nextState:"off"
        }
        standardTile("mode2", "device.mode2", inactiveLabel: false, width: 1, height: 1, decoration: "flat", wordWrap: true) {
            state "humidityMode", label: "Humidity", action: "mode2Light", icon: "st.Weather.weather12", backgroundColor: "#00a0dc", nextState:"lightMode"
            state "lightMode", label: "Light", action: "mode2Manual", icon: "st.Lighting.light11", backgroundColor: "#f1d801", nextState:"manualMode"
            state "manualMode", label: "Manual", action: "mode2Humidity", icon: "st.sonos.pause-icon", backgroundColor: "#FFFFFF", nextState:"humidityMode"
        }
        valueTile("titleRoom3", "device.titleRoom3", inactiveLabel: false, width: 2, height: 1, decoration: "flat", wordWrap: true) {
            state "default", label:'Guest En-Suite'
        }
        valueTile("valueTemp3", "device.valueTemp3", inactiveLabel: true, width: 1, height: 1, decoration: "flat", wordWrap: true) {
            state ("default", label:'${currentValue}\u00b0', backgroundColors:[
                [value: "error", color: "#ff0000"],
                [value: 0, color: "#153591"],
                [value: 7, color: "#1e9cbb"],
                [value: 15, color: "#90d2a7"],
                [value: 23, color: "#44b621"],
                [value: 28, color: "#f1d801"],
                [value: 35, color: "#d04e00"],
                [value: 37, color: "#bc2323"]
            ]
                  )
        }
        valueTile("valueHumidity3", "device.valueHumidity3", inactiveLabel: false, width: 1, height: 1, decoration: "flat", wordWrap: true) {
            state ("default", label:'${currentValue}%', backgroundColors:[
                [value: "error", color: "#ff0000"],
                [value: 20, color: "#153591"],
                [value: 30, color: "#1e9cbb"],
                [value: 40, color: "#90d2a7"],
                [value: 50, color: "#44b621"],
                [value: 60, color: "#f1d801"],
                [value: 70, color: "#d04e00"],
                [value: 80, color: "#bc2323"]                                      
            ]
                  )
        }
        standardTile("fan3", "device.fan3", inactiveLabel: false, width: 1, height: 1, decoration: "flat", wordWrap: true) {
            state "off", label: '', action: 'fan3On', icon: "st.thermostat.fan-off", backgroundColor: "#ffffff", nextState:"on"
            state "on", label: '', action: 'fan3Off', icon: "st.thermostat.fan-on" , backgroundColor: "#ff9900", nextState:"off"
        }
        standardTile("mode3", "device.mode3", inactiveLabel: false, width: 1, height: 1, decoration: "flat", wordWrap: true) {
            state "humidityMode", label: "Humidity", action: "mode3Light", icon: "st.Weather.weather12", backgroundColor: "#00a0dc", nextState:"lightMode"
            state "lightMode", label: "Light", action: "mode3Manual", icon: "st.Lighting.light11", backgroundColor: "#f1d801", nextState:"manualMode"
            state "manualMode", label: "Manual", action: "mode3Humidity", icon: "st.sonos.pause-icon", backgroundColor: "#FFFFFF", nextState:"humidityMode"
        }
        valueTile("titleRoom4", "device.titleRoom4", inactiveLabel: false, width: 2, height: 1, decoration: "flat", wordWrap: true) {
            state "default", label:'Downstairs WC'
        }
        valueTile("valueTemp4", "device.valueTemp4", inactiveLabel: true, width: 1, height: 1, decoration: "flat", wordWrap: true) {
            state ("default", label:'${currentValue}\u00b0', backgroundColors:[
                [value: "error", color: "#ff0000"],
                [value: 0, color: "#153591"],
                [value: 7, color: "#1e9cbb"],
                [value: 15, color: "#90d2a7"],
                [value: 23, color: "#44b621"],
                [value: 28, color: "#f1d801"],
                [value: 35, color: "#d04e00"],
                [value: 37, color: "#bc2323"]
            ]
                  )
        }
        valueTile("valueHumidity4", "device.valueHumidity4", inactiveLabel: false, width: 1, height: 1, decoration: "flat", wordWrap: true) {
            state ("default", label:''
                  )
        }
        standardTile("fan4", "device.fan4", inactiveLabel: false, width: 1, height: 1, decoration: "flat", wordWrap: true) {
            state "off", label: '', action: 'fan4On', icon: "st.thermostat.fan-off", backgroundColor: "#ffffff", nextState:"on"
            state "on", label: '', action: 'fan4Off', icon: "st.thermostat.fan-on" , backgroundColor: "#ff9900", nextState:"off"
        }
        standardTile("mode4", "device.mode4", inactiveLabel: false, width: 1, height: 1, decoration: "flat", wordWrap: true) {
            state "humidityMode", label: "Humidity", action: "mode4Light", icon: "st.Weather.weather12", backgroundColor: "#00a0dc", nextState:"lightMode"
            state "lightMode", label: "Light", action: "mode4Manual", icon: "st.Lighting.light11", backgroundColor: "#f1d801", nextState:"manualMode"
            state "manualMode", label: "Manual", action: "mode4Humidity", icon: "st.sonos.pause-icon", backgroundColor: "#FFFFFF", nextState:"humidityMode"
        }
        valueTile("titleRoom5", "device.titleRoom5", inactiveLabel: false, width: 2, height: 1, decoration: "flat", wordWrap: true) {
            state "default", label:'Utiltiy Room'
        }
        valueTile("valueTemp5", "device.valueTemp5", inactiveLabel: true, width: 1, height: 1, decoration: "flat", wordWrap: true) {
            state ("default", label:'${currentValue}\u00b0', backgroundColors:[
                [value: "error", color: "#ff0000"],
                [value: 0, color: "#153591"],
                [value: 7, color: "#1e9cbb"],
                [value: 15, color: "#90d2a7"],
                [value: 23, color: "#44b621"],
                [value: 28, color: "#f1d801"],
                [value: 35, color: "#d04e00"],
                [value: 37, color: "#bc2323"]
            ]
                  )
        }
        valueTile("valueHumidity5", "device.valueHumidity5", inactiveLabel: false, width: 1, height: 1, decoration: "flat", wordWrap: true) {
            state ("default", label:'${currentValue}%', backgroundColors:[
                [value: "error", color: "#ff0000"],
                [value: 20, color: "#153591"],
                [value: 30, color: "#1e9cbb"],
                [value: 40, color: "#90d2a7"],
                [value: 50, color: "#44b621"],
                [value: 60, color: "#f1d801"],
                [value: 70, color: "#d04e00"],
                [value: 80, color: "#bc2323"]                                      
            ]
                  )
        }
        standardTile("fan5", "device.fan5", inactiveLabel: false, width: 1, height: 1, decoration: "flat", wordWrap: true) {
            state "off", label: '', action: 'fan5On', icon: "st.thermostat.fan-off", backgroundColor: "#ffffff", nextState:"on"
            state "on", label: '', action: 'fan5Off', icon: "st.thermostat.fan-on" , backgroundColor: "#ff9900", nextState:"off"
        }
        standardTile("mode5", "device.mode5", inactiveLabel: false, width: 1, height: 1, decoration: "flat", wordWrap: true) {
            state "humidityMode", label: "Humidity", action: "mode5Light", icon: "st.Weather.weather12", backgroundColor: "#00a0dc", nextState:"lightMode"
            state "lightMode", label: "Light", action: "mode5Manual", icon: "st.Lighting.light11", backgroundColor: "#f1d801", nextState:"manualMode"
            state "manualMode", label: "Manual", action: "mode5Humidity", icon: "st.sonos.pause-icon", backgroundColor: "#FFFFFF", nextState:"humidityMode"
        }
        valueTile("titleRoom6", "device.titleRoom6", inactiveLabel: false, width: 2, height: 1, decoration: "flat", wordWrap: true) {
            state "default", label:'Danny AC'
        }
        valueTile("valueTemp6", "device.valueTemp6", inactiveLabel: true, width: 1, height: 1, decoration: "flat", wordWrap: true) {
            state ("default", label:'${currentValue}\u00b0', backgroundColors:[
                [value: "error", color: "#ff0000"],
                [value: 0, color: "#153591"],
                [value: 7, color: "#1e9cbb"],
                [value: 15, color: "#90d2a7"],
                [value: 23, color: "#44b621"],
                [value: 28, color: "#f1d801"],
                [value: 35, color: "#d04e00"],
                [value: 37, color: "#bc2323"]
            ]
                  )
        }
        controlTile("level6", "device.level6", "slider", height: 1, width: 1, range: "(16..30)", inactiveLabel: false) {
            state "default", action:"changevalueLevel6", backgroundColor:"#FF3300"
        }
        standardTile("fan6", "device.fan6", inactiveLabel: false, width: 1, height: 1, decoration: "flat", wordWrap: true) {
            state "off", label: '', action: 'fan6On', icon: "st.thermostat.heating-cooling-off", backgroundColor: "#ffffff", nextState:"on"
            state "on", label: 'On', action: 'fan6Off', icon: "st.vents.vent-open" , backgroundColor: "#ffffff", nextState:"off"
        }
        standardTile("mode6", "device.mode6", inactiveLabel: false, width: 1, height: 1, decoration: "flat", wordWrap: true) {
            state "heating", label: '', action: 'mode6Cool', icon: "https://i.ibb.co/WvGVKbF/mode-heat-active.png", nextState:"cooling"
            state "cooling", label: '', action: 'mode6Fan', icon: "https://i.ibb.co/XVJScmm/mode-cool-active.png", nextState:"fan only"
            state "fan only", label: '', action: 'mode6Dry', icon: "https://i.ibb.co/HNjLmb4/mode-fan-active.png", nextState:"Dry"
            state "Dry", label: '', action: 'mode6Auto', icon: "https://i.ibb.co/4fZZFwM/mode-dry-active.png", nextState:"auto"
            state "auto", label: '', action: 'mode6Heat', icon: "https://i.ibb.co/bm2qfht/mode-auto-active.png", nextState:"heating"
        }
        valueTile("titleRoom7", "device.titleRoom7", inactiveLabel: false, width: 2, height: 1, decoration: "flat", wordWrap: true) {
            state "default", label:'Karen AC'
        }
        valueTile("valueTemp7", "device.valueTemp7", inactiveLabel: true, width: 1, height: 1, decoration: "flat", wordWrap: true) {
            state ("default", label:'${currentValue}\u00b0', backgroundColors:[
                [value: "error", color: "#ff0000"],
                [value: 0, color: "#153591"],
                [value: 7, color: "#1e9cbb"],
                [value: 15, color: "#90d2a7"],
                [value: 23, color: "#44b621"],
                [value: 28, color: "#f1d801"],
                [value: 35, color: "#d04e00"],
                [value: 37, color: "#bc2323"]
            ]
                  )
        }
        controlTile("level7", "device.level7", "slider", height: 1, width: 1, range: "(16..30)", inactiveLabel: false) {
            state "default", action:"changevalueLevel7", backgroundColor:"#FF3300"
        }
        standardTile("fan7", "device.fan7", inactiveLabel: false, width: 1, height: 1, decoration: "flat", wordWrap: true) {
            state "off", label: '', action: 'fan7On', icon: "st.thermostat.heating-cooling-off", backgroundColor: "#ffffff", nextState:"on"
            state "on", label: 'On', action: 'fan7Off', icon: "st.vents.vent-open" , backgroundColor: "#ffffff", nextState:"off"
        }
        standardTile("mode7", "device.mode7", inactiveLabel: false, width: 1, height: 1, decoration: "flat", wordWrap: true) {
            state "heating", label: '', action: 'mode7Cool', icon: "https://i.ibb.co/WvGVKbF/mode-heat-active.png", nextState:"cooling"
            state "cooling", label: '', action: 'mode7Fan', icon: "https://i.ibb.co/XVJScmm/mode-cool-active.png", nextState:"fan only"
            state "fan only", label: '', action: 'mode7Dry', icon: "https://i.ibb.co/HNjLmb4/mode-fan-active.png", nextState:"Dry"
            state "Dry", label: '', action: 'mode7Auto', icon: "https://i.ibb.co/4fZZFwM/mode-dry-active.png", nextState:"auto"
            state "auto", label: '', action: 'mode7Heat', icon: "https://i.ibb.co/bm2qfht/mode-auto-active.png", nextState:"heating"
        }
        valueTile("titleRoom8", "device.titleRoom8", inactiveLabel: false, width: 2, height: 1, decoration: "flat", wordWrap: true) {
            state "default", label:'Living Room AC'
        }
        valueTile("valueTemp8", "device.valueTemp8", inactiveLabel: true, width: 1, height: 1, decoration: "flat", wordWrap: true) {
            state ("default", label:'${currentValue}\u00b0', backgroundColors:[
                [value: "error", color: "#ff0000"],
                [value: 0, color: "#153591"],
                [value: 7, color: "#1e9cbb"],
                [value: 15, color: "#90d2a7"],
                [value: 23, color: "#44b621"],
                [value: 28, color: "#f1d801"],
                [value: 35, color: "#d04e00"],
                [value: 37, color: "#bc2323"]
            ]
                  )
        }
       controlTile("level8", "device.level8", "slider", height: 1, width: 1, range: "(16..30)", inactiveLabel: false) {
            state "default", action:"changevalueLevel8", backgroundColor:"#FF3300"
        }
        standardTile("fan8", "device.fan8", inactiveLabel: false, width: 1, height: 1, decoration: "flat", wordWrap: true) {
            state "off", label: '', action: 'fan8On', icon: "st.thermostat.heating-cooling-off", backgroundColor: "#ffffff", nextState:"on"
            state "on", label: 'On', action: 'fan8Off', icon: "st.vents.vent-open" , backgroundColor: "#ffffff", nextState:"off"
        }
        standardTile("mode8", "device.mode8", inactiveLabel: false, width: 1, height: 1, decoration: "flat", wordWrap: true) {
            state "heating", label: '', action: 'mode8Cool', icon: "https://i.ibb.co/WvGVKbF/mode-heat-active.png", nextState:"cooling"
            state "cooling", label: '', action: 'mode8Fan', icon: "https://i.ibb.co/XVJScmm/mode-cool-active.png", nextState:"fan only"
            state "fan only", label: '', action: 'mode8Dry', icon: "https://i.ibb.co/HNjLmb4/mode-fan-active.png", nextState:"Dry"
            state "Dry", label: '', action: 'mode8Auto', icon: "https://i.ibb.co/4fZZFwM/mode-dry-active.png", nextState:"auto"
            state "auto", label: '', action: 'mode8Heat', icon: "https://i.ibb.co/bm2qfht/mode-auto-active.png", nextState:"heating"
        }
        valueTile("titleRoom9", "device.titleRoom9", inactiveLabel: false, width: 2, height: 1, decoration: "flat", wordWrap: true) {
            state "default", label:'Nest'
        }
        valueTile("valueTemp9", "device.valueTemp9", inactiveLabel: true, width: 1, height: 1, decoration: "flat", wordWrap: true) {
            state ("default", label:'${currentValue}\u00b0', backgroundColors:[
                [value: "error", color: "#ff0000"],
                [value: 0, color: "#153591"],
                [value: 7, color: "#1e9cbb"],
                [value: 15, color: "#90d2a7"],
                [value: 23, color: "#44b621"],
                [value: 28, color: "#f1d801"],
                [value: 35, color: "#d04e00"],
                [value: 37, color: "#bc2323"]
            ]
                  )
        }
        valueTile("valueHumidity9", "device.valueHumidity9", inactiveLabel: false, width: 1, height: 1, decoration: "flat", wordWrap: true) {
            state ("default", label:'${currentValue}%', backgroundColors:[
                [value: "error", color: "#ff0000"],
                [value: 20, color: "#153591"],
                [value: 30, color: "#1e9cbb"],
                [value: 40, color: "#90d2a7"],
                [value: 50, color: "#44b621"],
                [value: 60, color: "#f1d801"],
                [value: 70, color: "#d04e00"],
                [value: 80, color: "#bc2323"]                                      
            ]
                  )
        }
        standardTile("fan9", "device.fan9", inactiveLabel: false, width: 1, height: 1, decoration: "flat", wordWrap: true) {
            state "off", label: '', icon: "st.thermostat.heating-cooling-off", backgroundColor: "#ffffff"
            state "on", label: '', icon: "st.thermostat.heating" , backgroundColor: "#ff9900"
        }
        standardTile("mode9", "device.mode9", inactiveLabel: false, width: 1, height: 1, decoration: "flat", wordWrap: true) {
            state "humidityMode", label: "Humidity", icon: "st.Weather.weather12", backgroundColor: "#00a0dc"
            state "lightMode", label: "Light", icon: "st.Lighting.light11", backgroundColor: "#f1d801"
            state "manualMode", label: "Manual", icon: "st.sonos.pause-icon", backgroundColor: "#FFFFFF"
        }
        main(["titleIcon"])
        details(["titleIcon","titleTemp","titleHumidity","titleFan","titleMode",
        "titleRoom1","valueTemp1","valueHumidity1","fan1","mode1",
        "titleRoom2","valueTemp2","valueHumidity2","fan2","mode2",
        "titleRoom3","valueTemp3","valueHumidity3","fan3","mode3",
        "titleRoom4","valueTemp4","valueHumidity4","fan4","mode4",
        "titleRoom5","valueTemp5","valueHumidity5","fan5","mode5",
        "titleRoom6","valueTemp6","level6","fan6","mode6",
        "titleRoom7","valueTemp7","level7","fan7","mode7",
        "titleRoom8","valueTemp8","level8","fan8","mode8",
        "titleRoom9","valueTemp9","valueHumidity9","fan9","mode9"])
    }
}

def changevalueTemp1 (param) {
    sendEvent("name":"valueTemp1", "value":param)
}
def changevalueHumidity1 (param) {
    sendEvent("name":"valueHumidity1", "value":param)
}
def changevalueFan1 (param) {
    sendEvent("name":"fan1", "value":param)
}
def fan1On() {
    sendEvent("name":"fan1", "value":"on")
}
def fan1Off() {
    sendEvent("name":"fan1", "value":"off")
}
def changevalueMode1 (param) {
    sendEvent("name":"mode1", "value":param)
}
def mode1Manual() {
    sendEvent("name":"mode1", "value":"manualMode")
}
def mode1Light() {
    sendEvent("name":"mode1", "value":"lightMode")
}
def mode1Humidity() {
    sendEvent("name":"mode1", "value":"humidityMode")
}



def changevalueTemp2 (param) {
    sendEvent("name":"valueTemp2", "value":param)
}
def changevalueHumidity2 (param) {
    sendEvent("name":"valueHumidity2", "value":param)
}
def changevalueFan2 (param) {
    sendEvent("name":"fan2", "value":param)
}
def fan2On() {
    sendEvent("name":"fan2", "value":"on")
}
def fan2Off() {
    sendEvent("name":"fan2", "value":"off")
}
def changevalueMode2 (param) {
    sendEvent("name":"mode2", "value":param)
}
def mode2Manual() {
    sendEvent("name":"mode2", "value":"manualMode")
}
def mode2Light() {
    sendEvent("name":"mode2", "value":"lightMode")
}
def mode2Humidity() {
    sendEvent("name":"mode2", "value":"humidityMode")
}



def changevalueTemp3 (param) {
    sendEvent("name":"valueTemp3", "value":param)
}
def changevalueHumidity3 (param) {
    sendEvent("name":"valueHumidity3", "value":param)
}
def changevalueFan3 (param) {
    sendEvent("name":"fan3", "value":param)
}
def fan3On() {
    sendEvent("name":"fan3", "value":"on")
}
def fan3Off() {
    sendEvent("name":"fan3", "value":"off")
}
def changevalueMode3 (param) {
    sendEvent("name":"mode3", "value":param)
}
def mode3Manual() {
    sendEvent("name":"mode3", "value":"manualMode")
}
def mode3Light() {
    sendEvent("name":"mode3", "value":"lightMode")
}
def mode3Humidity() {
    sendEvent("name":"mode3", "value":"humidityMode")
}



def changevalueTemp4 (param) {
    sendEvent("name":"valueTemp4", "value":param)
}
def changevalueHumidity4 (param) {
    sendEvent("name":"valueHumidity4", "value":param)
}
def changevalueFan4 (param) {
    sendEvent("name":"fan4", "value":param)
}
def fan4On() {
    sendEvent("name":"fan4", "value":"on")
}
def fan4Off() {
    sendEvent("name":"fan4", "value":"off")
}
def changevalueMode4 (param) {
    sendEvent("name":"mode4", "value":param)
}
def mode4Manual() {
    sendEvent("name":"mode4", "value":"manualMode")
}
def mode4Light() {
    sendEvent("name":"mode4", "value":"lightMode")
}
def mode4Humidity() {
    sendEvent("name":"mode4", "value":"humidityMode")
}



def changevalueTemp5 (param) {
    sendEvent("name":"valueTemp5", "value":param)
}
def changevalueHumidity5 (param) {
    sendEvent("name":"valueHumidity5", "value":param)
}
def changevalueFan5 (param) {
    sendEvent("name":"fan5", "value":param)
}
def fan5On() {
    sendEvent("name":"fan5", "value":"on")
}
def fan5Off() {
    sendEvent("name":"fan5", "value":"off")
}
def changevalueMode5 (param) {
    sendEvent("name":"mode5", "value":param)
}
def mode5Manual() {
    sendEvent("name":"mode5", "value":"manualMode")
}
def mode5Light() {
    sendEvent("name":"mode5", "value":"lightMode")
}
def mode5Humidity() {
    sendEvent("name":"mode5", "value":"humidityMode")
}



def changevalueTemp6 (param) {
    sendEvent("name":"valueTemp6", "value":param)
}
def changevalueLevel6 (param) {
    sendEvent (name: "level6", value: param)
}
def changevalueFan6 (param) {
    sendEvent("name":"fan6", "value":param)
}
def fan6On() {
    sendEvent("name":"fan6", "value":"on")
}
def fan6Off() {
    sendEvent("name":"fan6", "value":"off")
}
def changevalueMode6 (param) {
    sendEvent("name":"mode6", "value":param)
}
def mode6Heat() {
    sendEvent("name":"mode6", "value":"heating")
}
def mode6Cool() {
    sendEvent("name":"mode6", "value":"cooling")
}
def mode6Fan() {
    sendEvent("name":"mode6", "value":"fan only")
}
def mode6Dry() {
    sendEvent("name":"mode6", "value":"Dry")
}
def mode6Auto() {
    sendEvent("name":"mode6", "value":"auto")
}


def changevalueTemp7 (param) {
    sendEvent("name":"valueTemp7", "value":param)
}
def changevalueLevel7 (param) {
    sendEvent (name: "level7", value: param)
}
def changevalueFan7 (param) {
    sendEvent("name":"fan7", "value":param)
}
def fan7On() {
    sendEvent("name":"fan7", "value":"on")
}
def fan7Off() {
    sendEvent("name":"fan7", "value":"off")
}
def changevalueMode7 (param) {
    sendEvent("name":"mode7", "value":param)
}
def mode7Heat() {
    sendEvent("name":"mode7", "value":"heating")
}
def mode7Cool() {
    sendEvent("name":"mode7", "value":"cooling")
}
def mode7Fan() {
    sendEvent("name":"mode7", "value":"fan only")
}
def mode7Dry() {
    sendEvent("name":"mode7", "value":"Dry")
}
def mode7Auto() {
    sendEvent("name":"mode7", "value":"auto")
}



def changevalueTemp8 (param) {
    sendEvent("name":"valueTemp8", "value":param)
}
def changevalueLevel8 (param) {
    sendEvent (name: "level8", value: param)
}
def changevalueFan8 (param) {
    sendEvent("name":"fan8", "value":param)
}
def fan8On() {
    sendEvent("name":"fan8", "value":"on")
}
def fan8Off() {
    sendEvent("name":"fan8", "value":"off")
}
def changevalueMode8 (param) {
    sendEvent("name":"mode8", "value":param)
}
def mode8Heat() {
    sendEvent("name":"mode8", "value":"heating")
}
def mode8Cool() {
    sendEvent("name":"mode8", "value":"cooling")
}
def mode8Fan() {
    sendEvent("name":"mode8", "value":"fan only")
}
def mode8Dry() {
    sendEvent("name":"mode8", "value":"Dry")
}
def mode8Auto() {
    sendEvent("name":"mode8", "value":"auto")
}


def changevalueTemp9 (param) {
    sendEvent("name":"valueTemp9", "value":param)
}
def changevalueHumidity9 (param) {
    sendEvent("name":"valueHumidity9", "value":param)
}
def changevalueFan9 (param) {
    sendEvent("name":"fan9", "value":param)
}
def changevalueMode9 (param) {
    sendEvent("name":"mode9", "value":param)
}

The Fan controller is actually setup to be a child device for a Fibaro Double Relay, so it’s not a standalone ‘value tiles’ type device:

metadata {
    definition (name: "Switch Child Device - Fan", namespace: "RobinWinbourne", author: "RobinWinbourne", vid: "generic-switch") {
        capability "Switch"
        capability "Actuator"
        capability "Sensor"
        capability "Refresh"
        capability "Momentary"
        capability "Button"

        attribute "currentTemp", "string"
        attribute "currentHumidity", "string"
        attribute "mode", "string"
        attribute "humidityLevel", "string"
        attribute "overrunLevel", "string"
        attribute "switch2", "string"


        command "setCurrentHumidity"
        command "setCurrentTemp"
        command "setHumidity"
        command "setLightMode"
        command "setHumidityMode"
        command "setManualMode"
        command "setMode"
        command "setHumidity"
        command "setOverrun"
        command "on2"
        command "off2"
    }

    tiles(scale: 2) {
        //multiAttributeTile(name:"switch", type: "lighting", width: 6, height: 4, canChangeIcon: false){
        //		tileAttribute ("device.switch", key: "PRIMARY_CONTROL") {
        //			attributeState "off", label: '${name}', action: "switch.on", icon: "https://cdn.rawgit.com/RobinWinbourne/devicetypes/master/fan3.png", backgroundColor: "#ffffff", nextState:"turningOn"
        //			attributeState "on", label: '${name}', action: "switch.off", icon: "https://cdn.rawgit.com/RobinWinbourne/devicetypes/master/fan3.png", backgroundColor: "#ff9900", nextState:"turningOff"
        //			attributeState "turningOn", label:'${name}', action:"switch.off", icon:"https://cdn.rawgit.com/RobinWinbourne/devicetypes/master/fan3.png", backgroundColor:"#ff9900", nextState:"turningOff"
        //			attributeState "turningOff", label:'${name}', action:"switch.on", icon:"https://cdn.rawgit.com/RobinWinbourne/devicetypes/master/fan3.png", backgroundColor:"#ffffff", nextState:"turningOn"
        //		}
        // 	}
        standardTile("Title1", "device.Title1", inactiveLabel: false, width: 2, height: 1, decoration: "flat", wordWrap: false) {
            state "default", label:'Fan'
        }

        standardTile("Title2", "device.Title2", inactiveLabel: false, width: 2, height: 1, decoration: "flat", wordWrap: false) {
            state "default", label:'Humidity'
        }

        standardTile("Title3", "device.Title3", inactiveLabel: false, width: 2, height: 1, decoration: "flat", wordWrap: false) {
            state "default", label:'Temperature'
        }
        standardTile("switch", "device.switch", inactiveLabel: false, width: 2, height: 2, decoration: "flat", canChangeIcon: false) {
            state "off", label: '${name}', action: "switch.on", icon: "https://cdn.rawgit.com/RobinWinbourne/devicetypes/master/fan3.png", backgroundColor: "#ffffff", nextState:"turningOn"
            state "on", label: '${name}', action: "switch.off", icon: "https://cdn.rawgit.com/RobinWinbourne/devicetypes/master/fan3.png", backgroundColor: "#ff9900", nextState:"turningOff"
            state "turningOn", label:'${name}', action:"switch.off", icon:"https://cdn.rawgit.com/RobinWinbourne/devicetypes/master/fan3.png", backgroundColor:"#ff9900", nextState:"turningOff"
            state "turningOff", label:'${name}', action:"switch.on", icon:"https://cdn.rawgit.com/RobinWinbourne/devicetypes/master/fan3.png", backgroundColor:"#ffffff", nextState:"turningOn"
        }
        valueTile("currentTemp", "device.currentTemp", inactiveLabel: true, width: 2, height: 2, decoration: "flat", wordWrap: true) {
            state ("default", label:'${currentValue}\u00b0', backgroundColors:[
                [value: "error", color: "#ff0000"],
                [value: 0, color: "#153591"],
                [value: 7, color: "#1e9cbb"],
                [value: 15, color: "#90d2a7"],
                [value: 23, color: "#44b621"],
                [value: 28, color: "#f1d801"],
                [value: 35, color: "#d04e00"],
                [value: 37, color: "#bc2323"]
            ]
                  )
        }
        valueTile("currentHumidity", "device.currentHumidity", inactiveLabel: false, width: 2, height: 2, decoration: "flat", wordWrap: true) {
            state ("default", label:'${currentValue}%', backgroundColors:[
                [value: "error", color: "#ff0000"],
                [value: 20, color: "#153591"],
                [value: 30, color: "#1e9cbb"],
                [value: 40, color: "#90d2a7"],
                [value: 50, color: "#44b621"],
                [value: 60, color: "#f1d801"],
                [value: 70, color: "#d04e00"],
                [value: 80, color: "#bc2323"]                                      
            ]
                  )
        }
        standardTile("Title4", "device.Title4", inactiveLabel: false, width: 2, height: 1, decoration: "flat", wordWrap: false) {
            state "default", label:'Mode'
        }

        standardTile("Title5", "device.Title5", inactiveLabel: false, width: 2, height: 1, decoration: "flat", wordWrap: false) {
            state "default", label:'Req. Humidity'
        }

        standardTile("Title6", "device.Title6", inactiveLabel: false, width: 2, height: 1, decoration: "flat", wordWrap: false) {
            state "default", label:'Overrun Time'
        }

        standardTile("mode", "device.mode", width: 2, height: 2, decoration: "flat", inactiveLabel: false) {
            state "humidityMode", label: "Humidity", action: "setLightMode", icon: "st.Weather.weather12", backgroundColor: "#00a0dc", nextState:"lightMode"
            state "lightMode", label: "Light", action: "setManualMode", icon: "st.Lighting.light11", backgroundColor: "#f1d801", nextState:"manualMode"
            state "manualMode", label: "Manual", action: "setHumidityMode", icon: "st.sonos.pause-icon", backgroundColor: "#FFFFFF", nextState:"humidityMode"
        }

        controlTile("humidityLevel", "device.humidityLevel", "slider", height: 2, width: 2, range: "(0..100)", inactiveLabel: false) {
            state "default", action:"setHumidity", backgroundColor:"#AF1586"
        }

        controlTile("overrunLevel", "device.overrunLevel", "slider", height: 2, width: 2, range: "(0..100)", inactiveLabel: false) {
            state "default", action:"setOverrun", backgroundColor:"#AF1586"
        }

        standardTile("switch2", "device.switch2", width: 2, height: 2, decoration: "flat", inactiveLabel: false) {
            state "on2", label: "Pushed", action: "off2", icon: "st.alarm.water.dry", backgroundColor: "#999900"
            state "Run Now", label: '${currentValue}', action: "on2", icon: "st.Health & Wellness.health7", backgroundColor: "#ffffff", nextState: "on2"
            state "Stop", label: '${currentValue}', action: "on2", icon: "st.Health & Wellness.health7", backgroundColor: "#ffffff", nextState: "on2"
        }

        standardTile("refresh", "device.switch", inactiveLabel: false, decoration: "flat", width: 2, height: 2) {
            state "default", label:"", action:"refresh.refresh", icon:"st.secondary.refresh"
        }

        main(["switch"])
        details(["Title1","Title2","Title3","switch","currentHumidity","currentTemp","Title4","Title5","Title6","mode","humidityLevel","overrunLevel","switch2","refresh"])
    }
}

def installed() {
    log.debug "installed()"
    configure()
}

def updated() {
    log.debug "updated()"
    configure()
}

def configure() {
	log.debug "configure()"
    sendEvent(name: "numberOfButtons", value: 1, displayed: true)
}

void on() {
    parent.childOn(device.deviceNetworkId)
    sendEvent(name: "switch2", value: "Stop", isStateChange: true, displayed: false)
}

void off() {
    parent.childOff(device.deviceNetworkId)
    sendEvent(name: "switch2", value: "Run Now", isStateChange: true, displayed: false)
}

void refresh() {
    parent.childRefresh(device.deviceNetworkId)
}

def setCurrentTemp (param) {
    sendEvent("name":"currentTemp", "value":param)
}
def setCurrentHumidity (param) {
    sendEvent("name":"currentHumidity", "value":param)
}
def setLightMode() {
    log.trace "Executing 'light'"
    sendEvent(name: "mode", value: "lightMode")
 //   state.lastHumidity = device.currentValue("humidityLevel")
  //  setHumidity(0)
}

def setHumidityMode() {
    log.trace "Executing 'humidity'"
    sendEvent(name: "mode", value: "humidityMode")
  //  setHumidity(state.lastHumidity)
   // setOverrun(state.lastOverrun)
}

def setManualMode() {
    log.trace "Executing 'manual'"
    sendEvent(name: "mode", value: "manualMode")
   // state.lastOverrun = device.currentValue("overrunLevel")
   // setOverrun(0)
}

def setMode(param) {
log.error "set mode to $param"
    if (param == "humidityMode") {setHumidityMode()}
    if (param == "lightMode") {setLightMode()}
    if (param == "manualMode") {setManualMode()}
}

def setHumidity(value) {
    log.trace "Executing setLevel Humidity $value"
    Map levelEventMap = buildSetLevelEvent(value)
    sendEvent(levelEventMap)
}

def setOverrun(value) {
    log.trace "Executing setLevel Overrun $value"
    Map levelEventMap = buildSetLevelEvent2(value)
    sendEvent(levelEventMap)
}

private Map buildSetLevelEvent(value) {
    def intValue = value as Integer
    def newLevel = Math.max(Math.min(intValue, 100), 0)
    Map eventMap = [name: "humidityLevel", value: newLevel, unit: "%"]
    return eventMap
}

private Map buildSetLevelEvent2(value) {
    def intValue = value as Integer
    def newLevel = Math.max(Math.min(intValue, 100), 0)
    Map eventMap = [name: "overrunLevel", value: newLevel, unit: "%"]
    return eventMap
}

def push() {
	sendEvent(name: "switch2", value: "on2", isStateChange: true, displayed: false)
	sendEvent(name: "switch2", value: "Run Now", isStateChange: true, displayed: false)
	sendEvent(name: "momentary", value: "pushed", isStateChange: true)
    sendEvent(name: "button", value: "pushed", data: [buttonNumber: 1], descriptionText: "$device.displayName button 1 was pushed", isStateChange: true)
}

def on2() {
	push()
}

def off2() {
	sendEvent(name: "switch2", value: "Run Now", isStateChange: true, displayed: false)
}

#79

could this be done with a water sensor


#80

It can be done with any device handler… just add the desired value tiles and command lines.

I suggest you study the basic version at the top of this thread to see what parts you need to copy.


#81

i have it all working i do have one question
the first tile you have on main sreen that white withe device name can you give that a color if device is on


#82

Not sure which example you are referring to… but a value tile can only have one colour (except for a range of colours based on a numerical value, i.e temperature.

If you wan’t a tile that dynamically changes colour based on different textual states, use a standard tile, as per the ‘mode’ tile I used in my ‘fan controller’ example.