This commit is contained in:
MichaelDvP
2024-07-15 22:12:42 +02:00
19 changed files with 104 additions and 64 deletions

View File

@@ -579,6 +579,7 @@ void Mqtt::ha_status() {
}
#endif
// TODO camelCase
publish_system_ha_sensor_config(DeviceValueType::STRING, "EMS Bus", "bus_status", DeviceValueUOM::NONE);
publish_system_ha_sensor_config(DeviceValueType::STRING, "Uptime", "uptime", DeviceValueUOM::NONE);
publish_system_ha_sensor_config(DeviceValueType::INT8, "Uptime (sec)", "uptime_sec", DeviceValueUOM::SECONDS);

View File

@@ -668,6 +668,7 @@ void System::send_info_mqtt() {
}
// create the json for heartbeat
// TODO camelCase
void System::heartbeat_json(JsonObject output) {
switch (EMSESP::bus_status()) {
case EMSESP::BUS_STATUS_OFFLINE:

View File

@@ -41,7 +41,7 @@ namespace emsesp {
// #define EMSESP_DEBUG_DEFAULT "310"
// #define EMSESP_DEBUG_DEFAULT "render"
// #define EMSESP_DEBUG_DEFAULT "api"
#define EMSESP_DEBUG_DEFAULT "api3"
// #define EMSESP_DEBUG_DEFAULT "api3"
// #define EMSESP_DEBUG_DEFAULT "crash"
// #define EMSESP_DEBUG_DEFAULT "dv"
// #define EMSESP_DEBUG_DEFAULT "lastcode"