Part of this could be done in fewer steps by using the Enphase binding that is submitted to be included: