You don´t mention which system version you are running or which model your machine is. I think this is highly relevant.
Two days ago this issue returned on my MBP 5,5 (mid 2009 13"). I am not interested in "Mountain Lion" and as I wrote above I went to a lot of trouble to revert to "Snow Leopard", which IMHO is the best ever Mac OS for my purposes.
I forgot to mention that not only the "Battery not charging" warning was coming and going but also the "Time & date" settings were lost every time the problem occurred.
Once again I re-installed my hard disk with ML into the machine, downloaded
the 10.8.2 "Combo update" and ran it. Everything was back to normal. This time the dmg that came down was the size that was stated on the download page at Apple.com.
Then swapped out the internal drive back to the SSD with "Snow Leopard".
Booted the machine from my CCC backup disk (in a USB box) and was able to repair the corrupted SSD. Booted back to SSD and everything looked good.
All that took place yesterday, today I booted without power supply or internet connection and the problem was back. In fact the machine switched itself off after 10 minutes. Did a SMC, was able to start but "Disk utility"found the SSD to be corrupt again. Back to my, non-corrupted CCCbackup, repaired the SSD.
As I write this, the "not charging" is coming and going all the time. I´m booted from the CCC backup.
So, to summarize ....
This HAS to be firmware trouble. It´s directly related to upgrading my original system HD to Mountain Lion, the issue began immediately after the install. Apple is kind of "in denial" of this issue AFAIK.
So I would really like to hear from anyone who has this trouble with a view to starting a "Class Action" to force Apple to either issue a patch to fix this or provide a free replacement Motherboard if it can´t be fixedPlease specify
which Machine you have.