fix ade7758

This commit is contained in:
2025-06-25 06:34:03 +01:00
parent a0b2e048d4
commit 84f106eee5
53 changed files with 7079 additions and 18456 deletions

View File

@@ -3,6 +3,9 @@
#include "cJSON.h"
#include "evse_api.h"
#include "evse_error.h"
#include "evse_config.h"
#include "evse_limits.h"
static const char *TAG = "dashboard_api";
@@ -40,10 +43,10 @@ static esp_err_t dashboard_get_handler(httpd_req_t *req) {
if (evse_is_limit_reached()) {
cJSON_AddItemToArray(alerts, cJSON_CreateString("Limite de consumo atingido."));
}
if (!evse_is_available()) {
if (!evse_config_is_available()) {
cJSON_AddItemToArray(alerts, cJSON_CreateString("Estação indisponível."));
}
if (!evse_is_enabled()) {
if (!evse_config_is_enabled()) {
cJSON_AddItemToArray(alerts, cJSON_CreateString("EVSE desativado."));
}
cJSON_AddItemToObject(dashboard, "alerts", alerts);