mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 00:09:51 +03:00
support 3 types of MQTT discovery entity id
This commit is contained in:
@@ -155,7 +155,7 @@ void Shower::set_shower_state(bool state, bool force) {
|
||||
doc["name"] = "Shower Active";
|
||||
|
||||
char str[70];
|
||||
if (Mqtt::multiple_instances()) {
|
||||
if (Mqtt::entity_format() == 2) {
|
||||
snprintf(str, sizeof(str), "%s_shower_active", Mqtt::basename().c_str());
|
||||
} else {
|
||||
snprintf(str, sizeof(str), "shower_active"); // v3.4 compatible
|
||||
|
||||
Reference in New Issue
Block a user