Merge pull request #16810 from barbudor/fix_script_topic

get correct topic var
This commit is contained in:
Theo Arends 2022-10-14 15:02:51 +02:00 committed by GitHub
commit 2456280139
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -4769,7 +4769,7 @@ extern char *SML_GetSVal(uint32_t index);
goto strexit;
}
if (!strncmp(vname, "topic", 5)) {
if (sp) strlcpy(sp, SettingsText(SET_MQTT_TOPIC), glob_script_mem.max_ssize);
if (sp) strlcpy(sp, TasmotaGlobal.mqtt_topic, glob_script_mem.max_ssize);
goto strexit;
}
#ifdef USE_SCRIPT_TIMER