I did exactly zero testing (so use the warranted caution), but something like this seems like it should work. 
/**
* Konnected Motion Sensor (Modified: Inactive Delay)
*
* Copyright 2018 Konnected Inc (https://konnected.io)
*
* 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:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
* for the specific language governing permissions and limitations under the License.
*
*/
metadata {
definition (name: "Konnected Motion Sensor", namespace: "konnected-io", author: "konnected.io", mnmn: "SmartThings", vid:"generic-motion") {
capability "Motion Sensor"
capability "Sensor"
}
preferences {
input name: "normalState", type: "enum", title: "Normal State",
options: ["Normally Closed", "Normally Open"],
defaultValue: "Normally Closed",
description: "Most motion sensors are Normally Closed (NC), meaning that the circuit opens when motion is detected. To reverse this logic, select Normally Open (NO)."
input name: "inactiveDelay", type: "enum", title: "Delay before \"inactive\" event",
options: [[0:"None"],[5:"5 seconds"],[10:"10 seconds"],[15:"15 seconds"],[20:"20 seconds"],[30:"30 seconds"],[45:"45 seconds"],[60:"1 minute"],[90: "1.5 minutes"],[120:"2 minutes"],[180:"3 minutes"]]
}
}
String isClosed() {
normalState == "Normally Open" ? "active" : "inactive"
}
String isOpen() {
normalState == "Normally Open" ? "inactive" : "active"
}
// Update state sent from parent app
void setStatus(state) {
String stateValue = state == "1" ? isOpen() : isClosed()
if (stateValue == "active") {
sendEvent(name: "motion", value: "active")
unschedule("setInactive")
log.info "${device.label} is active"
}
else {
Integer delay = (settings.inactiveDelay ? (settings.inactiveDelay as Integer) : 0)
if (delay) {
runIn(delay, "setInactive")
log.info "${device.label} will be set to inactive in $delay seconds"
}
else {
sendEvent(name: "motion", value: "inactive")
log.info "${device.label} is inactive"
}
}
}
void setInactive() {
sendEvent(name: "motion", value: "inactive")
}
This adds a preference to set the delay before the "inactive" event, so set that to some value and hit "Save Preferences," otherwise it should work the same as the original driver.