Skip to content

Commit

Permalink
shower uses mqtt base - emsesp#759
Browse files Browse the repository at this point in the history
  • Loading branch information
proddy committed Nov 30, 2022
1 parent 048bd87 commit eafe358
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/shower.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,13 @@ void Shower::set_shower_state(bool state, bool force) {
ha_configdone_ = true;

StaticJsonDocument<EMSESP_JSON_SIZE_HA_CONFIG> doc;
doc["name"] = "Shower Active";
doc["uniq_id"] = "shower_active";
doc["~"] = Mqtt::base();
doc["stat_t"] = "~/shower_active";
doc["name"] = "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";

// always render boolean as strings for HA
char result[12];
Expand Down

0 comments on commit eafe358

Please sign in to comment.