mirror of
https://github.com/mtan93/SmartThingsPublic.git
synced 2026-04-10 22:05:07 +01:00
Merge pull request #2047 from dkirker/ICP-1076
ICP-1076 Fix Aeon Door/Window Sensor 6 initial value of null
This commit is contained in:
@@ -113,9 +113,9 @@ def updated() {
|
|||||||
|
|
||||||
def configure() {
|
def configure() {
|
||||||
commands([
|
commands([
|
||||||
zwave.manufacturerSpecificV2.manufacturerSpecificGet(),
|
zwave.sensorBinaryV2.sensorBinaryGet(sensorType: zwave.sensorBinaryV2.SENSOR_TYPE_DOOR_WINDOW),
|
||||||
zwave.batteryV1.batteryGet()
|
zwave.manufacturerSpecificV2.manufacturerSpecificGet()
|
||||||
], 6000)
|
], 1000)
|
||||||
}
|
}
|
||||||
|
|
||||||
def sensorValueEvent(value) {
|
def sensorValueEvent(value) {
|
||||||
@@ -190,11 +190,17 @@ def zwaveEvent(physicalgraph.zwave.commands.wakeupv1.WakeUpNotification cmd)
|
|||||||
cmds << command(zwave.manufacturerSpecificV2.manufacturerSpecificGet())
|
cmds << command(zwave.manufacturerSpecificV2.manufacturerSpecificGet())
|
||||||
cmds << "delay 1200"
|
cmds << "delay 1200"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (device.currentValue("contact") == null) { // Incase our initial request didn't make it
|
||||||
|
cmds << command(zwave.sensorBinaryV2.sensorBinaryGet(sensorType: zwave.sensorBinaryV2.SENSOR_TYPE_DOOR_WINDOW))
|
||||||
|
}
|
||||||
|
|
||||||
if (!state.lastbat || now() - state.lastbat > 53*60*60*1000) {
|
if (!state.lastbat || now() - state.lastbat > 53*60*60*1000) {
|
||||||
cmds << command(zwave.batteryV1.batteryGet())
|
cmds << command(zwave.batteryV1.batteryGet())
|
||||||
} else {
|
} else { // If we check the battery state we will send NoMoreInfo in the handler for BatteryReport so that we definitely get the report
|
||||||
cmds << zwave.wakeUpV1.wakeUpNoMoreInformation().format()
|
cmds << zwave.wakeUpV1.wakeUpNoMoreInformation().format()
|
||||||
}
|
}
|
||||||
|
|
||||||
[event, response(cmds)]
|
[event, response(cmds)]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user