Default the autotuner id to empty, wrap the sonoff_d1 fallback and align the deprecation wording

This commit is contained in:
J. Nick Koston
2026-10-12 17:31:19 -10:00
parent 1e45d1893c
commit a70f565a22
3 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -107,7 +107,7 @@ class PIDAutotuner {
} state_ = AUTOTUNE_RUNNING;
float ku_;
float pu_;
const LogString *id_{nullptr};
const LogString *id_{reinterpret_cast<const LogString *>("")}; // empty until set, like the old std::string
};
} // namespace esphome::pid
+1 -1
View File
@@ -297,7 +297,7 @@ void SonoffD1Output::dump_config() {
" Use RM433 Remote: %s\n"
" Minimal brightness: %d\n"
" Maximal brightness: %d",
this->light_state_ ? LOG_STR_ARG(this->light_state_->get_log_name()) : "",
this->light_state_ ? LOG_STR_ARG(this->light_state_->get_log_name()) : LOG_STR_LITERAL(""),
ONOFF(this->use_rm433_remote_), this->min_value_, this->max_value_);
}
+2 -1
View File
@@ -336,7 +336,8 @@ class Sprinkler final : public Component {
void reset_resume();
/// returns a pointer to a valve's name string object; returns nullptr if valve_number is invalid
ESPDEPRECATED("Use valve_log_name() or control_switch()->get_name_to() instead. Removed in 2027.5.0", "2026.11.0")
ESPDEPRECATED("Use valve_log_name() or control_switch()->get_name_to() instead. Will be removed in ESPHome 2027.5.0",
"2026.11.0")
const char *valve_name(size_t valve_number);
/// returns a valve's name for a "%s" log argument; returns nullptr if valve_number is invalid
const LogString *valve_log_name(size_t valve_number);