From 0da5d44ea1269f4a9e368582e3523cbd1272b5d7 Mon Sep 17 00:00:00 2001 From: Felix Albrigtsen Date: Tue, 12 Sep 2023 20:31:14 +0200 Subject: [PATCH] Manually cast door state to int (#49) --- www/door/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/door/index.php b/www/door/index.php index 5a41c9b..67bb250 100644 --- a/www/door/index.php +++ b/www/door/index.php @@ -74,7 +74,7 @@ function handleSetState() { die(); } - $door->createEvent((int)($event->time), (bool)($event->isDoorOpen)); + $door->createEvent((int)($event->time), $event->isDoorOpen ? 1 : 0); echo '{"status": "OK"}'; } @@ -90,4 +90,4 @@ function getChanges($items) { } return $res; -} \ No newline at end of file +}