Sounds like something is loose or a bad ground. You check your sensor wire and make sure the connection is clean and if that doesn't do anything, pull out you gauge cluster and clean the connections on the back of that too.
Your sensor is a ground and as it heats up, it makes more resistance so the gauge deflects. That why the way to test if your gauge is good is by touching the sensor wire to the block or a known good ground. If you touch the wire to ground, the gauge will deflect fully meaning all the wiring and the gauge are good. That test lets you know the sensor is no good
I don't feel like working on anything at this time so i sold my yj.