You can program your Xfinity remote to work with your TV by heading to Connected Devices > Control your TV, and selecting your TV's make an model.
If you are an LG TV user, then the most common code for configuration is 12731. If this code does not work for you, then use these codes 11178, 10178, 11756, 11637, 10017, 11530, 10442, and 11314. If ...