From 08c6f143dc17dce526193784ea107ff4a4bd47f9 Mon Sep 17 00:00:00 2001 From: OpenT2T Date: Fri, 3 Mar 2017 03:11:10 -0800 Subject: [PATCH] Modifying 'Support device status.' --- .../opent2t-smartapp-test.groovy | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/smartapps/opent2t/opent2t-smartapp-test.src/opent2t-smartapp-test.groovy b/smartapps/opent2t/opent2t-smartapp-test.src/opent2t-smartapp-test.groovy index 9020974..8ff282f 100644 --- a/smartapps/opent2t/opent2t-smartapp-test.src/opent2t-smartapp-test.groovy +++ b/smartapps/opent2t/opent2t-smartapp-test.src/opent2t-smartapp-test.groovy @@ -226,11 +226,11 @@ def getDevices() { def deviceType = getDeviceType(it) if(deviceType == "thermostat") { - deviceData << [name: it.displayName, id: it.id, deviceType:deviceType, manufacturer:it.getManufacturerName(), model:it.getModelName(), attributes: deviceAttributeList(it), locationMode: getLocationModeInfo()] + deviceData << [name: it.displayName, id: it.id, deviceType:deviceType, status: it.getStatus(), manufacturer:it.getManufacturerName(), model:it.getModelName(), attributes: deviceAttributeList(it), locationMode: getLocationModeInfo()] } else { - deviceData << [name: it.displayName, id: it.id, deviceType:deviceType, manufacturer:it.getManufacturerName(), model:it.getModelName(), attributes: deviceAttributeList(it)] + deviceData << [name: it.displayName, id: it.id, deviceType:deviceType, status: it.getStatus(), manufacturer:it.getManufacturerName(), model:it.getModelName(), attributes: deviceAttributeList(it)] } } @@ -245,11 +245,11 @@ def getDevice() { def device if(deviceType == "thermostat") { - device = [name: it.displayName, id: it.id, deviceType:deviceType, manufacturer:it.getManufacturerName(), model:it.getModelName(), attributes: deviceAttributeList(it), locationMode: getLocationModeInfo()] + device = [name: it.displayName, id: it.id, deviceType:deviceType, status: it.getStatus(), manufacturer:it.getManufacturerName(), model:it.getModelName(), attributes: deviceAttributeList(it), locationMode: getLocationModeInfo()] } else { - device = [name: it.displayName, id: it.id, deviceType:deviceType, manufacturer:it.getManufacturerName(), model:it.getModelName(), attributes: deviceAttributeList(it)] + device = [name: it.displayName, id: it.id, deviceType:deviceType, status: it.getStatus(), manufacturer:it.getManufacturerName(), model:it.getModelName(), attributes: deviceAttributeList(it)] } log.debug "getDevice, return: ${device}" return device