|
12 | 12 | * for the specific language governing permissions and limitations under the License.
|
13 | 13 | *
|
14 | 14 | */
|
15 |
| - |
| 15 | + |
16 | 16 | import physicalgraph.zigbee.zcl.DataType
|
17 | 17 | import physicalgraph.zigbee.clusters.iaszone.ZoneStatus
|
18 | 18 |
|
19 | 19 | metadata {
|
20 |
| - definition (name:"ZigBee Lock Without Codes", namespace:"smartthings", author:"SmartThings", vid:"generic-lock-2", mnmn:"SmartThings", runLocally:true, minHubCoreVersion:'000.022.00013', executeCommandsLocally:true) { |
| 20 | + definition (name:"ZigBee Lock Without Codes", namespace:"smartthings", author:"SmartThings", vid:"generic-lock-2", mnmn:"SmartThings", runLocally:true, minHubCoreVersion:'000.022.00013', executeCommandsLocally:true, ocfDeviceType: "oic.d.smartlock") { |
21 | 21 | capability "Actuator"
|
22 | 22 | capability "Lock"
|
23 | 23 | capability "Refresh"
|
@@ -139,10 +139,10 @@ def initialize() {
|
139 | 139 | cmds += zigbee.enrollResponse()
|
140 | 140 | cmds += zigbee.configureReporting(CLUSTER_IAS_ZONE, IAS_ATTR_ZONE_STATUS, DataType.BITMAP16, 30, 60*5, null)
|
141 | 141 | } else {
|
142 |
| - cmds += zigbee.configureReporting(CLUSTER_DOORLOCK, DOORLOCK_ATTR_LOCKSTATE,DataType.ENUM8, 0, 3600, null) |
| 142 | + cmds += zigbee.configureReporting(CLUSTER_DOORLOCK, DOORLOCK_ATTR_LOCKSTATE,DataType.ENUM8, 0, 3600, null) |
143 | 143 | cmds += zigbee.configureReporting(CLUSTER_POWER, POWER_ATTR_BATTERY_PERCENTAGE_REMAINING,DataType.UINT8, 600, 21600, 0x01)
|
144 | 144 | cmds += zigbee.readAttribute(CLUSTER_POWER, POWER_ATTR_BATTERY_PERCENTAGE_REMAINING)
|
145 |
| - if (isSiHASLock()) cmds += zigbee.configureReporting(CLUSTER_DOORLOCK, DOORLOCK_ATTR_DOORSTATE,DataType.ENUM8, 0, 3600, null) |
| 145 | + if (isSiHASLock()) cmds += zigbee.configureReporting(CLUSTER_DOORLOCK, DOORLOCK_ATTR_DOORSTATE,DataType.ENUM8, 0, 3600, null) |
146 | 146 | cmds += refresh()
|
147 | 147 | }
|
148 | 148 |
|
@@ -193,7 +193,7 @@ private def parseAttributeResponse(String description) {
|
193 | 193 | responseMap.value = Math.round(Integer.parseInt(descMap.value, 16) / 2)
|
194 | 194 | responseMap.descriptionText = "Battery is at ${responseMap.value}%"
|
195 | 195 | }
|
196 |
| - |
| 196 | + |
197 | 197 | } else if (clusterInt == CLUSTER_DOORLOCK && attrInt == DOORLOCK_ATTR_LOCKSTATE) {
|
198 | 198 | def value = Integer.parseInt(descMap.value, 16)
|
199 | 199 | responseMap.name = "lock"
|
|
0 commit comments