Added battery state sensor. Reverted orignial battery sensor.