Chosen Solution

The sensor then the buttons on the side stopped working but not all the time

pweezy46  could be a bad button bar/IR board or a bad main board. You will have to let us know what model your TV is. To fix it remove the back of your TV and take a look at the board. You should measure 5V on the board itself. If not repalce it first then re-evaluate.