def get_data_points_by_platform_stats(
    central: CentralUnit, registered: bool | None = None
) -> Mapping[DataPointCategory, int]:
    """Return the central statistics for data points by platform."""
    _data_points_by_platform: dict[DataPointCategory, int] = {}
    for dp in central.get_data_points(registered=registered) + central.program_data_points + central.sysvar_data_points:
        if (platform := dp.category) not in _data_points_by_platform:
            _data_points_by_platform[platform] = 0
        _data_points_by_platform[platform] += 1
    return dict(sorted(_data_points_by_platform.items()))
Return the central statistics for data points by platform.
custom_components/homematicip_local/diagnostics.py