This commit is contained in:
unknown 2020-03-02 20:35:36 +01:00
commit 029d75cd33
1 changed files with 13 additions and 9 deletions

View File

@ -73,14 +73,14 @@ class Home extends Template
break; break;
case 'light': case 'light':
$replacementTrue = 'Light'; $replacementTrue = 'Light';
$replacementFalse = 'Dark'; $replacementFalse = 'Dark';
$operator = '=='; $operator = '==';
$breakValue = 1; $breakValue = 1;
if ($lastValue != 1 && $lastValue != 0) { //Digital Light Senzor if ($lastValue != 1 && $lastValue != 0) { //Digital Light Senzor
$operator = '<'; $operator = '<';
$breakValue = 810; $breakValue = 810;
} }
break; break;
case 'water': case 'water':
@ -122,7 +122,11 @@ class Home extends Template
$minutes = $interval->format('%i'); $minutes = $interval->format('%i');
$lastSeen = ($hours * 60 + $minutes); $lastSeen = ($hours * 60 + $minutes);
if ($lastSeen < $deviceData['sleep_time'] || $subDeviceData['type'] == "on/off") { if (
$lastSeen < $deviceData['sleep_time'] ||
$subDeviceData['type'] == "on/off" ||
$subDeviceData['type'] == "door"
) {
$connectionError = false; $connectionError = false;
} }
} }