From b07bc1d97beb7cb1777f5e6b331e06e5653daa2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xose=20P=C3=A9rez?= Date: Mon, 21 Nov 2016 01:11:25 +0100 Subject: [PATCH] fauxmoESP library returns boolean in onMessage callback --- code/src/fauxmo.ino | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/src/fauxmo.ino b/code/src/fauxmo.ino index 2449ecb9..cd32c601 100644 --- a/code/src/fauxmo.ino +++ b/code/src/fauxmo.ino @@ -24,9 +24,9 @@ void fauxmoConfigure() { void fauxmoSetup() { fauxmoConfigure(); - fauxmo.onMessage([](const char * state) { - DEBUG_MSG("[FAUXMO] State: %s\n", state); - relayStatus(0, state[0] == '1'); + fauxmo.onMessage([](bool state) { + DEBUG_MSG("[FAUXMO] State: %s\n", state ? "ON" : "OFF"); + relayStatus(0, state); }); }