1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-23 20:23:50 +01:00
This commit is contained in:
J. Nick Koston
2025-10-18 14:18:17 -10:00
parent 32eb43fd02
commit 1381db37ad
2 changed files with 3 additions and 3 deletions

View File

@@ -426,7 +426,7 @@ ColorMode LightCall::compute_color_mode_() {
// pre-colormode clients and automations, but also for the MQTT API, where HA doesn't let us know which color mode
// was used for some reason.
// Compute intersection of suitable and supported modes using bitwise AND
color_mode_bitmask_t intersection = this->get_suitable_color_modes_() & supported_modes.get_mask();
color_mode_bitmask_t intersection = this->get_suitable_color_modes_mask_() & supported_modes.get_mask();
// Don't change if the current mode is in the intersection (suitable AND supported)
if (ColorModeMask::mask_contains(intersection, current_mode)) {
@@ -450,7 +450,7 @@ ColorMode LightCall::compute_color_mode_() {
LOG_STR_ARG(color_mode_to_human(color_mode)));
return color_mode;
}
color_mode_bitmask_t LightCall::get_suitable_color_modes_() {
color_mode_bitmask_t LightCall::get_suitable_color_modes_mask_() {
bool has_white = this->has_white() && this->white_ > 0.0f;
bool has_ct = this->has_color_temperature();
bool has_cwww =

View File

@@ -186,7 +186,7 @@ class LightCall {
//// Compute the color mode that should be used for this call.
ColorMode compute_color_mode_();
/// Get potential color modes bitmask for this light call.
color_mode_bitmask_t get_suitable_color_modes_();
color_mode_bitmask_t get_suitable_color_modes_mask_();
/// Some color modes also can be set using non-native parameters, transform those calls.
void transform_parameters_();