mirror of
https://github.com/mtan93/SmartThingsPublic.git
synced 2026-03-26 13:24:09 +00:00
Merge pull request #1900 from tpmanley/feature/arrival-sensor-reporting
DVCSMP-2568 arrival-sensor-ha: Read battery level on join
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright 2016 SmartThings
|
* Copyright 2017 SmartThings
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
|
||||||
* in compliance with the License. You may obtain a copy of the License at:
|
* in compliance with the License. You may obtain a copy of the License at:
|
||||||
@@ -59,7 +59,7 @@ def updated() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def configure() {
|
def configure() {
|
||||||
def cmds = zigbee.batteryConfig(20, 20, 0x01)
|
def cmds = zigbee.readAttribute(zigbee.POWER_CONFIGURATION_CLUSTER, 0x0020) + zigbee.batteryConfig(20, 20, 0x01)
|
||||||
log.debug "configure -- cmds: ${cmds}"
|
log.debug "configure -- cmds: ${cmds}"
|
||||||
return cmds
|
return cmds
|
||||||
}
|
}
|
||||||
@@ -166,4 +166,4 @@ def checkPresenceCallback() {
|
|||||||
if (timeSinceLastCheckin >= theCheckInterval) {
|
if (timeSinceLastCheckin >= theCheckInterval) {
|
||||||
handlePresenceEvent(false)
|
handlePresenceEvent(false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user