Something

This commit is contained in:
JonatanRek 2020-05-02 13:26:18 +02:00
parent 23aa83ec9a
commit 043cac1cba
1 changed files with 3 additions and 1 deletions

View File

@ -34,15 +34,17 @@ class GoogleHomeApi {
} }
$online = false; $online = false;
$status = 'SUCCESS';
if (RecordManager::getLastRecord($deviceId['id'])['execuded'] == 1){ if (RecordManager::getLastRecord($deviceId['id'])['execuded'] == 1){
$online = true; $online = true;
$status = 'ERROR';
} }
$devices[] = [ $devices[] = [
$deviceId['id'] => [ $deviceId['id'] => [
'on' => $state, 'on' => $state,
'online' => $online, 'online' => $online,
'status'=> 'SUCCESS', 'status'=> $status,
] ]
]; ];
} }