From 24fa00ad575e3cc559e443afcb61f225e5faebde Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Thu, 9 Apr 2020 11:51:39 +0200 Subject: [PATCH] Fix grpflg detection Fix grpflg detection (#8095) --- tasmota/support_command.ino | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tasmota/support_command.ino b/tasmota/support_command.ino index 37fa195fc..addac2c76 100644 --- a/tasmota/support_command.ino +++ b/tasmota/support_command.ino @@ -182,7 +182,13 @@ void CommandHandler(char* topicBuf, char* dataBuf, uint32_t data_len) data_len--; } - bool grpflg = (strstr(topicBuf, SettingsText(SET_MQTT_GRP_TOPIC)) != nullptr); + bool grpflg = false; + uint32_t real_index = SET_MQTT_GRP_TOPIC; + for (uint32_t i = 0; i < MAX_GROUP_TOPICS; i++) { + if (1 == i) { real_index = SET_MQTT_GRP_TOPIC2 -1; } + grpflg = (strstr(topicBuf, SettingsText(real_index +i)) != nullptr); + if (grpflg) { break; } + } char stemp1[TOPSZ]; GetFallbackTopic_P(stemp1, ""); // Full Fallback topic = cmnd/DVES_xxxxxxxx_fb/