From 85a335d365a91c514a0dc4dfcdc266f666828aa4 Mon Sep 17 00:00:00 2001 From: chelseaokey Date: Wed, 18 May 2016 16:46:17 -0500 Subject: [PATCH] INTL-527 Temperature Notifications Should Respect Location Temp Scale --- smartapps/smartthings/its-too-cold.src/its-too-cold.groovy | 3 ++- smartapps/smartthings/its-too-hot.src/its-too-hot.groovy | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/smartapps/smartthings/its-too-cold.src/its-too-cold.groovy b/smartapps/smartthings/its-too-cold.src/its-too-cold.groovy index 0e66cc3..8364c20 100644 --- a/smartapps/smartthings/its-too-cold.src/its-too-cold.groovy +++ b/smartapps/smartthings/its-too-cold.src/its-too-cold.groovy @@ -73,7 +73,8 @@ def temperatureHandler(evt) { // TODO: Send "Temperature back to normal" SMS, turn switch off } else { log.debug "Temperature dropped below $tooCold: sending SMS to $phone1 and activating $mySwitch" - send("${temperatureSensor1.displayName} is too cold, reporting a temperature of ${evt.value}${evt.unit?:"F"}") + def tempScale = location.temperatureScale ?: "F" + send("${temperatureSensor1.displayName} is too cold, reporting a temperature of ${evt.value}${evt.unit?:tempScale}") switch1?.on() } } diff --git a/smartapps/smartthings/its-too-hot.src/its-too-hot.groovy b/smartapps/smartthings/its-too-hot.src/its-too-hot.groovy index e9c8c0f..5b8e10d 100644 --- a/smartapps/smartthings/its-too-hot.src/its-too-hot.groovy +++ b/smartapps/smartthings/its-too-hot.src/its-too-hot.groovy @@ -73,7 +73,8 @@ def temperatureHandler(evt) { // TODO: Send "Temperature back to normal" SMS, turn switch off } else { log.debug "Temperature rose above $tooHot: sending SMS to $phone1 and activating $mySwitch" - send("${temperatureSensor1.displayName} is too hot, reporting a temperature of ${evt.value}${evt.unit?:"F"}") + def tempScale = location.temperatureScale ?: "F" + send("${temperatureSensor1.displayName} is too hot, reporting a temperature of ${evt.value}${evt.unit?:tempScale}") switch1?.on() } }