Skip to content

Commit aafec3e

Browse files
authored
Merge pull request #1070 from whitevast/patch-4
Update SMotions_motionDetected.php
2 parents cf2c98f + 7737607 commit aafec3e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

modules/devices/SMotions_motionDetected.php

+5-2
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,18 @@
1414
}
1515

1616
$motion_timeout = $this->getProperty('timeout'); // seconds timeout
17-
if (!$motion_timeout) {
17+
if (!$motion_timeout== "") {
1818
$motion_timeout = 20; // timeout by default
1919
}
20+
if ($motion_timeout) {
21+
setTimeout($ot . '_motion_timer', 'setGlobal("' . $ot . '.status", 0);', $motion_timeout);
22+
}
23+
2024
$nobodysHome = getGlobal('NobodyHomeMode.active');
2125

2226
if (!isset($params['statusUpdated'])) {
2327
$this->setProperty('status', 1);
2428
}
25-
setTimeout($ot . '_motion_timer', 'setGlobal("' . $ot . '.status", 0);', $motion_timeout);
2629

2730
if ($nobodysHome && $this->getProperty('ignoreNobodysHome')) {
2831
return;

0 commit comments

Comments
 (0)