diff --git a/esp-videoswitcher.ino b/esp-videoswitcher.ino index 427a778..cff272d 100644 --- a/esp-videoswitcher.ino +++ b/esp-videoswitcher.ino @@ -29,7 +29,8 @@ bool switchHandler(const HomieRange& range, const String& value) { // Nur solange wir noch Platz für Inputbytes haben... :) if (localByte <= 3) { nextspace = value.indexOf(' ', lastspace); - commandbytes[localByte] = (value.substring(lastspace,nextspace-1)).toInt(); // TEST for sanity + commandbytes[localByte] = (value.substring(lastspace,nextspace)).toInt(); + lastspace = nextspace+1; localByte++; } }