From 753bebdde8ade56c58d223698f9c62a3e2914a8a Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 18 Oct 2025 12:02:52 -1000 Subject: [PATCH] fix --- esphome/components/api/api_connection.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/esphome/components/api/api_connection.cpp b/esphome/components/api/api_connection.cpp index f7ee0619c5..8be96c641b 100644 --- a/esphome/components/api/api_connection.cpp +++ b/esphome/components/api/api_connection.cpp @@ -476,6 +476,8 @@ uint16_t APIConnection::try_send_light_info(EntityBase *entity, APIConnection *c auto *light = static_cast(entity); ListEntitiesLightResponse msg; auto traits = light->get_traits(); + // msg.supported_color_modes is uint32_t, but get_mask() returns uint16_t + // The upper 16 bits are zero-extended during assignment (ColorMode only has 10 values) msg.supported_color_modes = traits.get_supported_color_modes().get_mask(); if (traits.supports_color_capability(light::ColorCapability::COLOR_TEMPERATURE) || traits.supports_color_capability(light::ColorCapability::COLD_WARM_WHITE)) {