This commit is contained in:
J. Nick Koston 2025-07-26 21:18:39 -10:00
parent dc45bed048
commit 3a49215dd6
No known key found for this signature in database

View File

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