Broke one of my tt bar di2 shift buttons

Well another lesson for me, I knocked my tt bar end into something tougher than the dura ace di2 shifter switch on the end, and cracked the structure holding the little button to let it pivot onto the switch. Couldn’t find the end piece anywhere so I ordered a replacement switch. Will I need to set up this button through the E-TUBE app or will it just assume the function of the previous button? Not sure where the programming takes place….in the switch or in the hub. I thought I read somewhere each device may have its own ID used in the di2 network ( like a CAN bus system), but I may be mistaken.
Thank you for any help and advice.