def async_add_hub_switch(data_points: tuple[SysvarDpSwitch | ProgramDpSwitch, ...]) -> None:
        """Add sysvar switch from Homematic(IP) Local."""
        _LOGGER.debug("ASYNC_ADD_HUB_SWITCH: Adding %i data points", len(data_points))

        if sysvar_entities := [
            HaHomematicSysvarSwitch(control_unit=control_unit, data_point=data_point)
            for data_point in data_points
            if isinstance(data_point, SysvarDpSwitch)
        ]:
            async_add_entities(sysvar_entities)

        if program_entities := [
            HaHomematicProgramSwitch(control_unit=control_unit, data_point=data_point)
            for data_point in data_points
            if isinstance(data_point, ProgramDpSwitch)
        ]:
            async_add_entities(program_entities)
Add sysvar switch from Homematic(IP) Local.
custom_components/homematicip_local/switch.py