From 546b27773f990fa33fa457817a647f49accd098f Mon Sep 17 00:00:00 2001 From: Charles R Date: Thu, 15 Oct 2020 14:40:24 +0200 Subject: [PATCH] Pilight identifier (#782) * feat: add device_id as unique identifier * fix: walk on entire array --- main/ZgatewayPilight.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/ZgatewayPilight.ino b/main/ZgatewayPilight.ino index d3f4aa4..03b085f 100644 --- a/main/ZgatewayPilight.ino +++ b/main/ZgatewayPilight.ino @@ -54,7 +54,7 @@ void pilightCallback(const String& protocol, const String& message, int status, // but some device may use another name as unique identifier char* choices[] = {"key", "unit", "device_id", "systemcode", "unitcode", "programcode"}; - for (uint8_t i = 0; i < 5; i++) { + for (uint8_t i = 0; i < 6; i++) { if (msg[choices[i]]) { device_id = (const char*)msg[choices[i]]; break;