A device for detecting a battery condition