Pilight identifier (#782)

* feat: add device_id as unique identifier

* fix: walk on entire array
This commit is contained in:
Charles R authored and GitHub committed 2020-10-15 07:40:24 -05:00
1 parent 43e5629304
commit 546b27773f
1 file changed
+1 -1
+1 -1
View File
@@ -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;