Custom content entity template preprocess doesn't contain any variables
I needed to remove the #

/**
 * Implements hook_theme().
 */
function my_module_theme($existing, $type, $theme, $path) {
  return [
    'my_module' =&gt; [
      'path' =&gt; $path . '/templates',
      'template' =&gt; 'my-module',
      'variables' =&gt; [
        'my_entity' =&gt; '',
      ],
    ],
  ];
}


now i have my entity and can work on :)