Automation Restart & Deactive Button add

This commit is contained in:
JonatanRek
2019-10-11 17:16:24 +02:00
parent 2e81a86ed0
commit 001e74bc6d
4 changed files with 47 additions and 1 deletions

View File

@@ -13,6 +13,10 @@ class AutomationManager{
return Db::command ('UPDATE automation SET active = ? WHERE automation_id=?', array ($flipedValue,$automationId));
}
public function restart($automationId) {
return Db::command ('UPDATE automation SET executed = 0 WHERE automation_id=?', array ($automationId));
}
public function create ($name, $onDays, $doCode, $ifCode, $automationId = "") {
$scene = array (
'name' => $name,