def result = false
if (motion) {
- if (motion.latestValue("motion").contains("active")) {
+ if (motion.latestValue("motion") == "active") {
motionDetected = true
}
}
if (acceleration) {
- if (acceleration.latestValue("acceleration").contains("active")) {
+ if (acceleration.latestValue("acceleration") == "active") {
accelerationDetected = true
}
}