From 30561411e1b125eccd051004d6435864a8333784 Mon Sep 17 00:00:00 2001 From: proddy Date: Wed, 8 Mar 2023 11:58:46 +0530 Subject: [PATCH] fix compile standalone --- src/mqtt.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mqtt.cpp b/src/mqtt.cpp index 68c657ea0..00039d1d7 100644 --- a/src/mqtt.cpp +++ b/src/mqtt.cpp @@ -647,12 +647,14 @@ void Mqtt::ha_status() { snprintf(topic, sizeof(topic), "binary_sensor/%s/system_status/config", mqtt_basename_.c_str()); Mqtt::queue_ha(topic, doc.as()); // publish the config payload with retain flag - // create the sensors - must match the MQTT payload keys - // these are all from the heartbeat MQTT topic +// create the sensors - must match the MQTT payload keys +// these are all from the heartbeat MQTT topic +#ifndef EMSESP_STANDALONE if (!EMSESP::system_.ethernet_connected() || WiFi.isConnected()) { publish_system_ha_sensor_config(DeviceValueType::INT, "WiFi RSSI", "rssi", DeviceValueUOM::DBM); publish_system_ha_sensor_config(DeviceValueType::INT, "WiFi strength", "wifistrength", DeviceValueUOM::PERCENT); } +#endif publish_system_ha_sensor_config(DeviceValueType::STRING, "EMS Bus", "bus_status", DeviceValueUOM::NONE); publish_system_ha_sensor_config(DeviceValueType::STRING, "Uptime", "uptime", DeviceValueUOM::NONE);