1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-04 02:52:22 +01:00

Reduce ESP_LOGCONFIG calls (#9026)

This commit is contained in:
J. Nick Koston
2025-06-08 19:02:30 -05:00
committed by GitHub
parent 80dddb4cae
commit c0b05ada1a
218 changed files with 1569 additions and 931 deletions

View File

@@ -91,12 +91,16 @@ void LightState::setup() {
void LightState::dump_config() {
ESP_LOGCONFIG(TAG, "Light '%s'", this->get_name().c_str());
if (this->get_traits().supports_color_capability(ColorCapability::BRIGHTNESS)) {
ESP_LOGCONFIG(TAG, " Default Transition Length: %.1fs", this->default_transition_length_ / 1e3f);
ESP_LOGCONFIG(TAG, " Gamma Correct: %.2f", this->gamma_correct_);
ESP_LOGCONFIG(TAG,
" Default Transition Length: %.1fs\n"
" Gamma Correct: %.2f",
this->default_transition_length_ / 1e3f, this->gamma_correct_);
}
if (this->get_traits().supports_color_capability(ColorCapability::COLOR_TEMPERATURE)) {
ESP_LOGCONFIG(TAG, " Min Mireds: %.1f", this->get_traits().get_min_mireds());
ESP_LOGCONFIG(TAG, " Max Mireds: %.1f", this->get_traits().get_max_mireds());
ESP_LOGCONFIG(TAG,
" Min Mireds: %.1f\n"
" Max Mireds: %.1f",
this->get_traits().get_min_mireds(), this->get_traits().get_max_mireds());
}
}
void LightState::loop() {