mirror of
https://github.com/esphome/esphome.git
synced 2025-10-31 23:21:54 +00:00
simplify
This commit is contained in:
@@ -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_);
|
||||
}
|
||||
|
||||
@@ -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_();
|
||||
|
||||
Reference in New Issue
Block a user