From 4bba52a09e31ba3b8fff9c77297aadc6d0e675d3 Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Mon, 25 Apr 2022 14:38:12 +0200 Subject: [PATCH] native boolean values in commands, fix #476 --- src/command.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/command.cpp b/src/command.cpp index 43d3d24b6..98d5b63b2 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -152,6 +152,8 @@ uint8_t Command::process(const char * path, const bool is_admin, const JsonObjec } else if (data.is()) { char data_str[10]; return_code = Command::call(device_type, command_p, Helpers::render_value(data_str, data.as(), 2), is_admin, id_n, output); + } else if (data.is()) { + return_code = Command::call(device_type, command_p, data.as() ? "1" : "0", is_admin, id_n, output); } else if (data.isNull()) { return_code = Command::call(device_type, command_p, "", is_admin, id_n, output); // empty, will do a query instead } else {