diff --git a/examples/LedStrip/LedStrip.ino b/examples/LedStrip/LedStrip.ino index 7cfb0d40..d067fa10 100644 --- a/examples/LedStrip/LedStrip.ino +++ b/examples/LedStrip/LedStrip.ino @@ -10,13 +10,13 @@ bool stripLedHandler(const HomieRange& range, const String& value) { if (range.index < 1 || range.index > NUMBER_OF_LED) return false; // if it's not a valid range - if (value != "on" && value != "off") return false; // if the value is not valid + if (value != "true" && value != "false") return false; // if the value is not valid - bool on = (value == "on"); + bool on = (value == "true"); digitalWrite(LED_PINS[range.index - 1], on ? HIGH : LOW); stripNode.setProperty("led").setRange(range).send(value); // Update the state of the led - Homie.getLogger() << "Led " << range.index << " is " << value << endl; + Homie.getLogger() << "Led " << range.index << " is " << (on ? "on" : "off") << endl; return true; }