shower uses mqtt base - #759

This commit is contained in:
Proddy
2022-11-30 21:18:15 +01:00
parent 048bd877da
commit eafe358deb

View File

@@ -152,7 +152,10 @@ void Shower::set_shower_state(bool state, bool force) {
StaticJsonDocument<EMSESP_JSON_SIZE_HA_CONFIG> doc; StaticJsonDocument<EMSESP_JSON_SIZE_HA_CONFIG> doc;
doc["name"] = "Shower Active"; 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["~"] = Mqtt::base();
doc["stat_t"] = "~/shower_active"; doc["stat_t"] = "~/shower_active";