1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-31 23:21:54 +00:00
This commit is contained in:
J. Nick Koston
2025-10-30 19:00:02 -05:00
parent b9d0e4061b
commit f66f9c4eaf
2 changed files with 6 additions and 6 deletions

View File

@@ -300,14 +300,14 @@ const optional<ClimatePreset> &ClimateCall::get_preset() const { return this->pr
const char *ClimateCall::get_custom_fan_mode() const { return this->custom_fan_mode_; }
const char *ClimateCall::get_custom_preset() const { return this->custom_preset_; }
optional<std::string> ClimateCall::get_custom_fan_mode_optional() const {
optional<std::string> ClimateCall::get_custom_fan_mode() const {
if (this->custom_fan_mode_ != nullptr) {
return std::string(this->custom_fan_mode_);
}
return {};
}
optional<std::string> ClimateCall::get_custom_preset_optional() const {
optional<std::string> ClimateCall::get_custom_preset() const {
if (this->custom_preset_ != nullptr) {
return std::string(this->custom_preset_);
}

View File

@@ -110,12 +110,12 @@ class ClimateCall {
const optional<ClimateFanMode> &get_fan_mode() const;
const optional<ClimateSwingMode> &get_swing_mode() const;
const optional<ClimatePreset> &get_preset() const;
/// @deprecated Use get_custom_fan_mode() (returns const char*) instead (since 2025.11.0)
optional<std::string> get_custom_fan_mode() const;
/// @deprecated Use get_custom_preset() (returns const char*) instead (since 2025.11.0)
optional<std::string> get_custom_preset() const;
const char *get_custom_fan_mode() const;
const char *get_custom_preset() const;
/// @deprecated Use get_custom_fan_mode() (returns const char*) instead (since 2025.11.0)
optional<std::string> get_custom_fan_mode_optional() const;
/// @deprecated Use get_custom_preset() (returns const char*) instead (since 2025.11.0)
optional<std::string> get_custom_preset_optional() const;
protected:
void validate_();