From: Seyed Amir Hossein Aqajari Date: Mon, 5 Aug 2019 20:51:55 +0000 (-0700) Subject: Update gideon-smart-home.groovy X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c40d2a9d85678e7608bbc249d8c7ded0f2b558cf;p=smartapps.git Update gideon-smart-home.groovy --- diff --git a/official/gideon-smart-home.groovy b/official/gideon-smart-home.groovy index f1a7d0a..45babc1 100755 --- a/official/gideon-smart-home.groovy +++ b/official/gideon-smart-home.groovy @@ -520,15 +520,6 @@ def getWaterSensorStatus() { } } //batteries -def getBatteryStatus() { - def device = batteries.find { it.id == params.id } - if (!device) { - httpError(404, "Device not found") - } else { - return [Device_state: device.latestValue("battery")] - } -} - def getBatteryStatus(id) { def device = batteries.find { it.id == id } if (!device) { @@ -611,16 +602,6 @@ def getOutletStatus() { return [Device_state: device.currentValue('switch')] + watt } -def getMeterStatus() { - - def device = meters.find { it.id == params.id } - if (!device) { - httpError(404, "Device not found") - } else { - return [Device_id: device.id, Device_type: device.type, Current_watt: device.currentValue("power")] - } -} - def getMeterStatus(id) { def device = meters.find { it.id == id }