fix ade7758
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user