From f466453a8ef0dd18b7f11bc12755931b2113067c Mon Sep 17 00:00:00 2001 From: proddy Date: Thu, 21 Jan 2021 20:24:32 +0100 Subject: [PATCH] HA cleanup --- src/mqtt.cpp | 2 +- src/shower.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mqtt.cpp b/src/mqtt.cpp index 84c7f75a9..102e7df1f 100644 --- a/src/mqtt.cpp +++ b/src/mqtt.cpp @@ -514,7 +514,7 @@ void Mqtt::ha_status() { doc["uniq_id"] = FJSON("ems-esp-system"); doc["~"] = System::hostname(); // default ems-esp // doc["avty_t"] = FJSON("~/status"); // commented out, as it causes errors in HA sometimes - doc["json_attr_t"] = FJSON("~/heartbeat"); + // doc["json_attr_t"] = FJSON("~/heartbeat"); // store also as HA attributes doc["stat_t"] = FJSON("~/heartbeat"); doc["name"] = FJSON("EMS-ESP status"); doc["val_tpl"] = FJSON("{{value_json['status']}}"); diff --git a/src/shower.cpp b/src/shower.cpp index 6f6b7dcf8..eba5afff0 100644 --- a/src/shower.cpp +++ b/src/shower.cpp @@ -96,8 +96,8 @@ void Shower::send_mqtt_stat(bool state) { return; } - char s[7]; - Mqtt::publish(F("shower_active"), Helpers::render_boolean(s, state)); + // char s[7]; + // Mqtt::publish(F("shower_active"), Helpers::render_boolean(s, state)); // if we're in HA mode make sure we've first sent out the HA MQTT Discovery config topic if ((Mqtt::ha_enabled()) && (!ha_configdone_)) {