saltstack/salt-contrib — pull request #77 by vectorsigma (2014-05-29 18:02:04+00:00)
Title: Initial revision of has_battery grain.  

Requires acpi binary for correct output.

Also only works in Linux at this time, and probably needs some formatting cleanup, etc. Let me know what needs to be done, and I'll get it finished.