mirror of
https://github.com/mtan93/SmartThingsPublic.git
synced 2026-03-08 05:31:56 +00:00
Including unknown temperature values as part of the response for sensors
https://smartthings.atlassian.net/browse/DVCSMP-1511
This commit is contained in:
@@ -48,8 +48,8 @@ metadata {
|
||||
}
|
||||
|
||||
standardTile("motion", "device.motion") {
|
||||
state("active", label:'motion', icon:"st.motion.motion.active", backgroundColor:"#53a7c0")
|
||||
state("inactive", label:'no motion', icon:"st.motion.motion.inactive", backgroundColor:"#ffffff")
|
||||
state("active", label:'motion', icon:"st.motion.motion.active", backgroundColor:"#53a7c0")
|
||||
}
|
||||
|
||||
standardTile("refresh", "device.refresh", inactiveLabel: false, decoration: "flat") {
|
||||
|
||||
@@ -545,10 +545,15 @@ def updateSensorData() {
|
||||
def occupancy = ""
|
||||
it.capability.each {
|
||||
if (it.type == "temperature") {
|
||||
if (location.temperatureScale == "F") {
|
||||
temperature = Math.round(it.value.toDouble() / 10)
|
||||
if (it.value == "unknown") {
|
||||
temperature = "--"
|
||||
} else {
|
||||
temperature = convertFtoC(it.value.toDouble() / 10)
|
||||
if (location.temperatureScale == "F") {
|
||||
temperature = Math.round(it.value.toDouble() / 10)
|
||||
} else {
|
||||
temperature = convertFtoC(it.value.toDouble() / 10)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} else if (it.type == "occupancy") {
|
||||
|
||||
Reference in New Issue
Block a user