From e3e14e7a665c665dfb268abda7374b8c857aff1b Mon Sep 17 00:00:00 2001 From: pswid <78219494+pswid@users.noreply.github.com> Date: Mon, 30 Jan 2023 19:50:36 +0100 Subject: [PATCH] fixed NTP status in HA (see #931) I missed this one --- src/system.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/system.cpp b/src/system.cpp index 21a904d49..36a816126 100644 --- a/src/system.cpp +++ b/src/system.cpp @@ -595,10 +595,7 @@ bool System::heartbeat_json(JsonObject & output) { output["uptime"] = uuid::log::format_timestamp_ms(uuid::get_uptime_ms(), 3); output["uptime_sec"] = uuid::get_uptime_sec(); bool value_b = ntp_connected(); - if (Mqtt::ha_enabled()) { - char s[12]; - output["ntp_status"] = Helpers::render_boolean(s, value_b); // for HA always render as string - } else if (EMSESP::system_.bool_format() == BOOL_FORMAT_TRUEFALSE) { + if (EMSESP::system_.bool_format() == BOOL_FORMAT_TRUEFALSE) { output["ntp_status"] = value_b; } else if (EMSESP::system_.bool_format() == BOOL_FORMAT_10) { output["ntp_status"] = value_b ? 1 : 0;