Including unknown temperature values as part of the response for sensors

https://smartthings.atlassian.net/browse/DVCSMP-1511
This commit is contained in:
Yaima Valdivia
2016-03-02 14:20:44 -08:00
parent ab4e8a892a
commit e7e6ea7d56
2 changed files with 9 additions and 4 deletions

View File

@@ -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") {