mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 00:09:51 +03:00
HA cleanup
This commit is contained in:
@@ -514,7 +514,7 @@ void Mqtt::ha_status() {
|
|||||||
doc["uniq_id"] = FJSON("ems-esp-system");
|
doc["uniq_id"] = FJSON("ems-esp-system");
|
||||||
doc["~"] = System::hostname(); // default ems-esp
|
doc["~"] = System::hostname(); // default ems-esp
|
||||||
// doc["avty_t"] = FJSON("~/status"); // commented out, as it causes errors in HA sometimes
|
// 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["stat_t"] = FJSON("~/heartbeat");
|
||||||
doc["name"] = FJSON("EMS-ESP status");
|
doc["name"] = FJSON("EMS-ESP status");
|
||||||
doc["val_tpl"] = FJSON("{{value_json['status']}}");
|
doc["val_tpl"] = FJSON("{{value_json['status']}}");
|
||||||
|
|||||||
@@ -96,8 +96,8 @@ void Shower::send_mqtt_stat(bool state) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
char s[7];
|
// char s[7];
|
||||||
Mqtt::publish(F("shower_active"), Helpers::render_boolean(s, state));
|
// 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 we're in HA mode make sure we've first sent out the HA MQTT Discovery config topic
|
||||||
if ((Mqtt::ha_enabled()) && (!ha_configdone_)) {
|
if ((Mqtt::ha_enabled()) && (!ha_configdone_)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user