How to automatically create an electrical circuit in Dynamo or Dynamo Player

The goal is to use Dynamo, Custom Node, Python to automatically start the process of creating the wires of an electrical circuit (the circuit elements are set correctly so that the parameters work normally and can create wires).
to be implemented in a GUI or Dynamo Player.

Input data: elements of a circuit set correctly for parameters: Panel, Switch … without wires.
Output data: Dynamo Player or a simple GUI that will automatically create wires for that good electrical circuit in Revit.
If something like this could be done, I would need help.

I search on the web and I think can be solved with python:

# import List 
clr.AddReference("System")
from System.Collections.Generic import List 
...
for a in input:
	electComponents = List[ElementId]()
	OUT = electComponents
	for item in a:
		electComponents.Add(item.Id)
new_circuit = ElectricalSystem.Create(doc, electComponents, ElectricalSystemType.PowerCircuit)

I used and Select Model Elements for input and I selected after I tested and works well on the manually created circuit path and works.
The output OUT to Watch show me the elements selected when I run without the next line of source code, but the Create gives me an error when I used it:
new_circuit = ElectricalSystem.Create(doc, electComponents, ElectricalSystemType.PowerCircuit)
The error is this:

Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed. 
Traceback (most recent call last):
  File "<string>", line 84, in <module>
Exception: There should be at least one component that can create the specified circuit type
Parameter name: electComponents

Any help with this issue? Thank you.