Aditional changes afiliated to log

This commit is contained in:
JonatanRek
2019-08-30 17:44:22 +02:00
parent 031b35937d
commit d43b2328b4
3 changed files with 7 additions and 4 deletions

View File

@@ -116,8 +116,10 @@ class AutomationManager{
foreach ($sceneDoArray as $deviceId => $deviceState) {
RecordManager::create($deviceId, 'on/off', $deviceState);
}
$logManager->write("[AUTOMATIONS] automation id ". $automation['automation_id'] . " was executed");
Db::edit('automation', array('executed' => 1), 'WHERE automation_id = ?', array($automation['automation_id']));
} else if ($restart) {
$logManager->write("[AUTOMATIONS] automation id ". $automation['automation_id'] . " was restarted");
Db::edit('automation', array('executed' => 0), 'WHERE automation_id = ?', array($automation['automation_id']));
}
}