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:
-
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) -
Change the main from: main “temperature”
to : main([“displaytemperature”, “temperature”])Can I do this? (second bold text)
-
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"])**
}
————