This commit is contained in:
Proddy
2022-12-16 22:57:59 +01:00
parent b6de431a56
commit 147be12583
19 changed files with 64 additions and 42 deletions

View File

@@ -155,7 +155,11 @@ void Shower::set_shower_state(bool state, bool force) {
doc["name"] = "Shower Active";
char str[70];
snprintf(str, sizeof(str), "%s_shower_active", Mqtt::basename().c_str());
if (Mqtt::multiple_instances()) {
snprintf(str, sizeof(str), "%s_shower_active", Mqtt::basename().c_str());
} else {
snprintf(str, sizeof(str), "shower_active"); // v3.4 compatible
}
doc["uniq_id"] = str;
doc["object_id"] = str;