X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=official%2Fgideon-smart-home.groovy;h=49600350c47b14afdcaca9f83f9d140ff593d403;hb=80f62f1335e20b69b02fe82e18ffdafdbd658a58;hp=f1a7d0a7986371623c9d50287fea94055fac5bb5;hpb=c37de03a67dafbe13ab2d1e1c83b1aafe870296f;p=smartapps.git diff --git a/official/gideon-smart-home.groovy b/official/gideon-smart-home.groovy index f1a7d0a..4960035 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 } @@ -696,17 +677,6 @@ def turnOffSwitch() { //TEMPERATURE -def getTempSensorsStatus() { - def device = temperature_sensors.find { it.id == params.id } - if (!device) { - httpError(404, "Device not found") - } else { - def bat = getBatteryStatus(device.id) - def scale = [Scale: location.temperatureScale] - return [Device_state: device.currentValue('temperature')] + scale + bat - } -} - def getTempSensorsStatus(id) { def device = temperature_sensors.find { it.id == id } if (!device) {