Newbee question on tile and displaying tile on Dashboard in Favorites Section (Classic Version)

I want to modify the CT100 to display a larger temperature number on the dashboard. I am new to this and after some research, I am thinking of modifying the existing CT100 DTH as follows:

  1. Adding a “displaytemperature” valuetile BEFORE the existing REFRESH tile
    The information on the “displaytemperature” tile is the same as the “temperature”
    Can I do this? (first bold text)

  2. Change the main from: main “temperature”
    to : main([“displaytemperature”, “temperature”])

    Can I do this? (second bold text)

  3. Change the details to include the new tile as below (the third bold text)

The modified code is below. Thank you for your help.

Modified code:
—————

tiles {
multiAttributeTile(name:“temperature”, type:“generic”, width:3, height:2, canChangeIcon: true) {
tileAttribute(“device.temperature”, key: “PRIMARY_CONTROL”) {
attributeState(“temperature”, label:’{currentValue}°', icon: "st.alarm.temperature.normal", backgroundColors:[ // Celsius [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"], // Fahrenheit [value: 40, color: "#153591"], [value: 44, color: "#1e9cbb"], [value: 59, color: "#90d2a7"], [value: 74, color: "#44b621"], [value: 84, color: "#f1d801"], [value: 95, color: "#d04e00"], [value: 96, color: "#bc2323"] ] ) } tileAttribute("device.batteryIcon", key: "SECONDARY_CONTROL") { attributeState "ok_battery", label:'{currentValue}%’, icon:“st.arlo.sensor_battery_4”
attributeState “low_battery”, label:‘Low Battery’, icon:“st.arlo.sensor_battery_0”
}
}
standardTile(“mode”, “device.thermostatMode”, width:2, height:2, inactiveLabel: false, decoration: “flat”) {
state “off”, action:“switchMode”, nextState:"…", icon: “st.thermostat.heating-cooling-off”
state “heat”, action:“switchMode”, nextState:"…", icon: “st.thermostat.heat”
state “cool”, action:“switchMode”, nextState:"…", icon: “st.thermostat.cool”
state “auto”, action:“switchMode”, nextState:"…", icon: “st.thermostat.auto”
state “emergency heat”, action:“switchMode”, nextState:"…", icon: “st.thermostat.emergency-heat”
state “…”, label: “Updating…”,nextState:"…", backgroundColor:"#ffffff"
}
standardTile(“fanMode”, “device.thermostatFanMode”, width:2, height:2, inactiveLabel: false, decoration: “flat”) {
state “auto”, action:“switchFanMode”, nextState:"…", icon: “st.thermostat.fan-auto”
state “on”, action:“switchFanMode”, nextState:"…", icon: “st.thermostat.fan-on”
state “circulate”, action:“switchFanMode”, nextState:"…", icon: “st.thermostat.fan-circulate”
state “…”, label: “Updating…”, nextState:"…", backgroundColor:"#ffffff"
}
standardTile(“humidity”, “device.humidity”, width:2, height:2, inactiveLabel: false, decoration: “flat”) {
state “humidity”, label:’{currentValue}%', icon:"st.Weather.weather12" } standardTile("lowerHeatingSetpoint", "device.heatingSetpoint", width:2, height:1, inactiveLabel: false, decoration: "flat") { state "heatingSetpoint", action:"lowerHeatingSetpoint", icon:"st.thermostat.thermostat-left" } valueTile("heatingSetpoint", "device.heatingSetpoint", width:2, height:1, inactiveLabel: false, decoration: "flat") { state "heatingSetpoint", label:'{currentValue}° heat’, backgroundColor:"#ffffff"
}
standardTile(“raiseHeatingSetpoint”, “device.heatingSetpoint”, width:2, height:1, inactiveLabel: false, decoration: “flat”) {
state “heatingSetpoint”, action:“raiseHeatingSetpoint”, icon:“st.thermostat.thermostat-right”
}
standardTile(“lowerCoolSetpoint”, “device.coolingSetpoint”, width:2, height:1, inactiveLabel: false, decoration: “flat”) {
state “coolingSetpoint”, action:“lowerCoolSetpoint”, icon:“st.thermostat.thermostat-left”
}
valueTile(“coolingSetpoint”, “device.coolingSetpoint”, width:2, height:1, inactiveLabel: false, decoration: “flat”) {
state “coolingSetpoint”, label:’{currentValue}° cool', backgroundColor:"#ffffff" } standardTile("raiseCoolSetpoint", "device.heatingSetpoint", width:2, height:1, inactiveLabel: false, decoration: "flat") { state "heatingSetpoint", action:"raiseCoolSetpoint", icon:"st.thermostat.thermostat-right" } standardTile("thermostatOperatingState", "device.thermostatOperatingState", width: 2, height:2, decoration: "flat") { state "thermostatOperatingState", label:'{currentValue}’, backgroundColor:"#ffffff"
}
valueTile(“displaytemperature", “device.temperature”, inactiveLabel: false, width: 2, height: 2) {
** state “temperature”, label: ‘${currentValue}°’,**
** backgroundColors: [**
** // Celsius**
** [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”],**
** // Fahrenheit**
** [value: 40, color: “#153591”],**
** [value: 44, color: “#1e9cbb”],**
** [value: 59, color: “#90d2a7”],**
** [value: 74, color: “#44b621”],**
** [value: 84, color: “#f1d801”],**
** [value: 95, color: “#d04e00”],**
** [value: 96, color: “#bc2323”]**
** ]**
** }**
standardTile(“refresh”, “device.thermostatMode”, width:2, height:2, inactiveLabel: false, decoration: “flat”) {
state “default”, action:“refresh.refresh”, icon:“st.secondary.refresh”
}
main ([“displaytemperature”, “temperature”])
details([“temperature”, “lowerHeatingSetpoint”, “heatingSetpoint”, “raiseHeatingSetpoint”, “lowerCoolSetpoint”,
** “coolingSetpoint”, “raiseCoolSetpoint”, “mode”, “fanMode”, “humidity”, “thermostatOperatingState”, **
** “displaytemperature”, ”refresh"])**
}

————

Hopefully someone will be along soon to help with your question.

Meanwhile, please always put code in a code block when you post to the forum.

There are several community members, including me, who rely on voice readers, and trust me, there are a lot more fun things to do than listen to three minutes of groovy spoken aloud. :wink:

2 Likes

It’s really hard to read the code the way you posted it, but I know what you’re trying to do.

The order in which these tiles are defined has no impact on how they’re displayed in the mobile app. That’s determined based upon the order you have the tiles listed in “detail”.

Yes you can, but all you need is displaytemperature. A long, long time ago ST allowed users to pick which tile was the “main” tile in the mobile app, but that’s not used anymore. What ever you put in main is what shows up in Favorites, and in the Rooms and Things view.

You don’t need to add displaytemperature to “detail”, unless you want another tile with temperature to show up when you go to the device’s detail page.

Here’s an example of what I do. temperature2 is my displaytemperature. I believe if you don’t include an icon that it will show just the temperature value, but then it will look odd when you see the device in a Room view or the Things list because there won’t be an icon on the left, just a big grey dot.

    valueTile("temperature2", "device.temperature", width: 1, height: 1, canChangeIcon: false) {
        state "temperature", label: '${currentValue}°', icon:"st.thermostat.ac.air-conditioning", backgroundColor:"#38a815"}
    
	main (["temperature2"])
	details(["temperature", "heatSliderControl", "statusL2Text", "coolSliderControl", "fanon", "fanauto", "fancir", "modeheat", "modecool", "modeauto", "modeheatemrgcy", "refresh", "configure", "modeoff"])

Room View:

Raw code:
https://raw.githubusercontent.com/jsconstantelos/SmartThings/master/devicetypes/jsconstantelos/my-zwave-thermostat.src/my-zwave-thermostat.groovy

1 Like

Thank,
That is so cool. I will follow your recommendation. I am still learning

1 Like