After a recent firmware update I found that the battery in my HTC Desire didn't seem to last as long. Usually with light use the battery would last 36-48 hours. After the update it barely made it through the first day.
Even when the charge LED was green once I removed the power lead the battery would instantly report less than 95% charge.
Either the battery was defective or it was "confused". Luckily I found the following procedure on xda-developers that solved the problem :
Step 1
Make sure the phone is powered on and connect it to the charger. Leave it charging until the notification LED turns green.
Step 2
Disconnect from the charger and power it off.
Step 3
Reconnect to the charger with the phone powered off. Leave it charging until the notification LED turns green.
Step 4
Disconnect the phone from the charger and power it on. Once the phone is powered completely on, power it off again.
Step 5
Reconnect it to the charger until the notification LED is green.
Step 6
Disconnect the phone and power it on. That's it!
You should only need to follow this sequence once. It may be necessary to repeat if you upgrade the firmware.