Manually cast door state to int (#49)

This commit is contained in:
Felix Albrigtsen 2023-09-12 20:31:14 +02:00 committed by GitHub
parent 133c4e269d
commit 0da5d44ea1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -74,7 +74,7 @@ function handleSetState() {
die(); die();
} }
$door->createEvent((int)($event->time), (bool)($event->isDoorOpen)); $door->createEvent((int)($event->time), $event->isDoorOpen ? 1 : 0);
echo '{"status": "OK"}'; echo '{"status": "OK"}';
} }
@ -90,4 +90,4 @@ function getChanges($items) {
} }
return $res; return $res;
} }