diff --git a/code/espurna/relay.ino b/code/espurna/relay.ino index d5ec83c6..44eb8e36 100644 --- a/code/espurna/relay.ino +++ b/code/espurna/relay.ino @@ -319,21 +319,20 @@ unsigned char _relayValueFromPayload(const char * payload) { // Payload could be "OFF", "ON", "TOGGLE" // or its number equivalents: 0, 1 or 2 - unsigned int value; - // trim payload char * p = ltrim((char *)payload); - if (strcmp(p, "ON") == 0) { - value = 1; + // to lower + for (unsigned char i=0; i