From e8ff36d1f3766950c13bafcbcf0bd05d8184edc8 Mon Sep 17 00:00:00 2001 From: Guillermo Ruffino Date: Mon, 3 Oct 2022 18:50:33 -0300 Subject: [PATCH] fix dump preset string type (#3863) --- esphome/components/thermostat/thermostat_climate.cpp | 4 +--- esphome/components/thermostat/thermostat_climate.h | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/esphome/components/thermostat/thermostat_climate.cpp b/esphome/components/thermostat/thermostat_climate.cpp index a9b03187d3..54e9f1687c 100644 --- a/esphome/components/thermostat/thermostat_climate.cpp +++ b/esphome/components/thermostat/thermostat_climate.cpp @@ -935,10 +935,8 @@ bool ThermostatClimate::supplemental_heating_required_() { (this->supplemental_action_ == climate::CLIMATE_ACTION_HEATING)); } -void ThermostatClimate::dump_preset_config_(const std::string &preset, const ThermostatClimateTargetTempConfig &config, +void ThermostatClimate::dump_preset_config_(const char *preset_name, const ThermostatClimateTargetTempConfig &config, bool is_default_preset) { - const auto *preset_name = preset.c_str(); - ESP_LOGCONFIG(TAG, " %s Is Default: %s", preset_name, YESNO(is_default_preset)); if (this->supports_heat_) { diff --git a/esphome/components/thermostat/thermostat_climate.h b/esphome/components/thermostat/thermostat_climate.h index aa7529cfb1..a738ba4986 100644 --- a/esphome/components/thermostat/thermostat_climate.h +++ b/esphome/components/thermostat/thermostat_climate.h @@ -228,7 +228,7 @@ class ThermostatClimate : public climate::Climate, public Component { bool supplemental_cooling_required_(); bool supplemental_heating_required_(); - void dump_preset_config_(const std::string &preset_name, const ThermostatClimateTargetTempConfig &config, + void dump_preset_config_(const char *preset_name, const ThermostatClimateTargetTempConfig &config, bool is_default_preset); /// The sensor used for getting the current temperature