mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
shower uses mqtt base - #759
This commit is contained in:
@@ -152,7 +152,10 @@ void Shower::set_shower_state(bool state, bool force) {
|
||||
|
||||
StaticJsonDocument<EMSESP_JSON_SIZE_HA_CONFIG> doc;
|
||||
doc["name"] = "Shower Active";
|
||||
doc["uniq_id"] = "shower_active";
|
||||
char str[70];
|
||||
snprintf(str, sizeof(str), "%s_shower_active", Mqtt::basename().c_str());
|
||||
doc["uniq_id"] = str;
|
||||
doc["object_id"] = str;
|
||||
doc["~"] = Mqtt::base();
|
||||
doc["stat_t"] = "~/shower_active";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user