2004 GMC Sierra 1500 speedometer only works in warm weather

I have a 2004 GMC pickup. For over two years now the speedometer does not work-except- in the warm summer months. The first fall winter it started going bad (it pegs out at 120 and usually stays there although sometimes at low speeds it will register 60 to 80 mph) I just figured I’d live with it. BTW, the odometer works fine. Then last summer when it got hot it started working again and worked fine until the weather started turning cold again. Now, this summer, 2018, it is working again. I don’t totally trust it, but it seems to be right. Do you have any idea what could cause this seemingly temperature related problem?

Bad instrument cluster, or specifically, the speedometer IN that instrument cluster.