Clean-up logs

To reduce RAM requirements
This commit is contained in:
Edward Firmo
2024-03-08 13:23:30 +01:00
parent 1d52396e96
commit 32e9246ace
2 changed files with 0 additions and 20 deletions

View File

@@ -51,11 +51,8 @@ climate:
internal: false
on_state:
- lambda: |-
static const char *const TAG = "addon_climate_base.climate.thermostat_embedded.on_state";
ESP_LOGD(TAG, "Starting");
page_climate->execute();
page_home->execute();
ESP_LOGD(TAG, "Finished");
globals:
##### Is embedded thermostat visible on climate page? #####
@@ -83,7 +80,6 @@ script:
then:
- lambda: |-
if (embedded and !id(is_uploading_tft)) {
static const char *const TAG = "addon_climate_base.script.change_climate_state";
auto FahrenheitToCelsius = [](float fahrenheit) -> float {
return (fahrenheit - 32.0) * 5.0 / 9.0;
};
@@ -97,26 +93,17 @@ script:
if (key == "temperature") {
temperature = stof(value) / 10;
if (temp_unit_fahrenheit) temperature = FahrenheitToCelsius(temperature);
ESP_LOGD(TAG, "set_target_temperature(%f)", temperature);
call.set_target_temperature(temperature);
} else if (key == "target_temp_high") {
temperature = stof(value) / 10;
if (temp_unit_fahrenheit) temperature = FahrenheitToCelsius(temperature);
ESP_LOGD(TAG, "set_target_temperature_high(%f)", temperature);
call.set_target_temperature_high(temperature);
} else if (key == "target_temp_low") {
temperature = stof(value) / 10;
if (temp_unit_fahrenheit) temperature = FahrenheitToCelsius(temperature);
ESP_LOGD(TAG, "set_target_temperature_low(%f)", temperature);
call.set_target_temperature_low(temperature);
} else if (key == "hvac_mode") {
ESP_LOGD(TAG, "hvac_mode(%s)", value.c_str());
call.set_mode(value);
} else {
ESP_LOGE(TAG, "Invalid call:");
ESP_LOGE(TAG, " Embedded: %s", YESNO(embedded));
ESP_LOGE(TAG, " Key: %s", key.c_str());
ESP_LOGE(TAG, " Value: %s", value.c_str());
}
call.perform();
}
@@ -131,7 +118,6 @@ script:
- lambda: |-
id(is_addon_climate_visible) = (current_page->state == "climate" and detailed_entity->state == "embedded_climate");
if (id(is_addon_climate_visible) and !id(is_uploading_tft)) {
static const char *const TAG = "addon_climate_base.script.page_climate";
auto CelsiusToFahrenheit = [](float celsius) -> float {
return (celsius * 9 / 5) + 32;
};
@@ -139,9 +125,6 @@ script:
bool temp_unit_fahrenheit = (temp_units == "°F" || temp_units == "F" || temp_units == "°f" || temp_units == "f");
ClimateTraits traits = thermostat_embedded->get_traits();
ESP_LOGV(TAG, "Climate page constructor:");
ESP_LOGV(TAG, " Add-on mode: %s", (${addon_climate_dual}) ? "Dual" : ((${addon_climate_heat}) ? "Heat" : ((${addon_climate_cool}) ? "Cool" : "Unknown")));
ESP_LOGV(TAG, " Temp. units: %s", temp_unit_fahrenheit ? "Fahrenheit" : "Celsius");
disp1->set_component_text_printf("page_label", id(addon_climate_friendly_name).c_str());
float temp_step = traits.get_visual_target_temperature_step();
float temp_offset = traits.get_visual_min_temperature();

View File

@@ -50,9 +50,6 @@ api:
url: string
then:
- lambda: |-
static const char *const TAG = "addon_upload_tft.api.services.upload_tft";
ESP_LOGD(TAG, "Custom TFT file upload requested");
ESP_LOGD(TAG, " URL: %s", url.c_str());
std::string clean_url = url;
// Convert to lowercase
std::transform(clean_url.begin(), clean_url.end(), clean_url.begin(),