Add a method for determining power source.