def color_mode(self) -> ColorMode | None:
        """Return the color mode of the light."""
        if self._data_point.is_valid:
            if self._data_point.supports_hs_color:
                return ColorMode.HS
            if self._data_point.supports_color_temperature:
                return ColorMode.COLOR_TEMP
            if self._data_point.supports_brightness:
                return ColorMode.BRIGHTNESS
        if self.is_restored and self._restored_state:
            return self._restored_state.attributes.get(ATTR_COLOR_MODE)

        return ColorMode.ONOFF
Return the color mode of the light.
custom_components/homematicip_local/light.py