From 043cac1cba087dacd9513bdeab34f05372e82ac2 Mon Sep 17 00:00:00 2001 From: JonatanRek Date: Sat, 2 May 2020 13:26:18 +0200 Subject: [PATCH] Something --- app/api/GoogleHomeApi.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/api/GoogleHomeApi.php b/app/api/GoogleHomeApi.php index 9b2782f..c07cab7 100644 --- a/app/api/GoogleHomeApi.php +++ b/app/api/GoogleHomeApi.php @@ -34,15 +34,17 @@ class GoogleHomeApi { } $online = false; + $status = 'SUCCESS'; if (RecordManager::getLastRecord($deviceId['id'])['execuded'] == 1){ $online = true; + $status = 'ERROR'; } $devices[] = [ $deviceId['id'] => [ 'on' => $state, 'online' => $online, - 'status'=> 'SUCCESS', + 'status'=> $status, ] ]; }