Custom Component - How to implement diagostics component

Hi All,

I am trying to implement the diagnostics component / functionality into a custom component.
2022-12-01 10_48_51-Settings – Home Assistant and 4 more pages - Work - Microsoft​ Edge

Unfortunately I cannot find any related documentation via the developer search.

Someone know a good point to start? Minimalistic implementation in another component?

Just if anyone else is searching for this.
Custom component homematic (IP) local provides a good starting point with very simple code:

custom_homematic/diagnostics.py at devel · danielperna84/custom_homematic (github.com)