1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-28 13:43:54 +00:00

Fix light_call.cpp to use first_value_from_mask instead of first_mode_from_mask

The generic FiniteSetMask uses first_value_from_mask, not first_mode_from_mask.
This aligns with the enum_mask_helper implementation.
This commit is contained in:
J. Nick Koston
2025-10-22 14:33:48 -10:00
parent d8cb5d4aa4
commit ae41ae80ca

View File

@@ -437,7 +437,7 @@ ColorMode LightCall::compute_color_mode_() {
// Use the preferred suitable mode. // Use the preferred suitable mode.
if (intersection != 0) { if (intersection != 0) {
ColorMode mode = ColorModeMask::first_mode_from_mask(intersection); ColorMode mode = ColorModeMask::first_value_from_mask(intersection);
ESP_LOGI(TAG, "'%s': color mode not specified; using %s", this->parent_->get_name().c_str(), ESP_LOGI(TAG, "'%s': color mode not specified; using %s", this->parent_->get_name().c_str(),
LOG_STR_ARG(color_mode_to_human(mode))); LOG_STR_ARG(color_mode_to_human(mode)));
return mode; return mode;