Simple REST light: class sets invalid supported color modes ColorMode.RGB, ColorMode.BRIGHTNESS

I develop simple light custom component: mystic_light_ha/custom_components/mystic_light/light.py at 8c9beb1d8d693cc4ec73b5bcafda90e52b62bafb · and7ey/mystic_light_ha · GitHub

But it shows
None (<class 'custom_components.mystic_light.light.MysticLight'>) sets invalid supported color modes {<ColorMode.RGB: 'rgb'>, <ColorMode.BRIGHTNESS: 'brightness'>}, this will stop working in Home Assistant Core 2025.3, please create a bug report at https://github.com/and7ey/mystic_light/issues

What am I doing wrong?
I don’t see anything about color modes depreciation at Light entity | Home Assistant Developer Docs.

Thanks. I have

self._attr_supported_color_modes = {ColorMode.BRIGHTNESS, ColorMode.RGB}
self._attr_color_mode = ColorMode.BRIGHTNESS

is it wrong?

IDK, but it’s extremely likely to be your problem