mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-01-26 16:49:11 +03:00
fixes for #804
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user