AccordionPanel cannot be opened programatically

I am using Vaadin 14.08 and programmatically add 2 AcordionPanels to an Accordion.
The first panel is opened by default.

But if I do

accordion.close();

And then

accordion.open(1);
//or
accordion.open(secondPanel);
//or
secondPanel.setOpened(true);

The “secondPanel” is NOT opened.

If I run the program, the “secondPanel” can be opened clicking on it, but programmatically I cannot open it.

I think it may be a bug. But maybe I am doing something wrong.
Can anyone help me?.

If no response, I will try “Details” component instead of Accordion.
Thanks.

PD: I have tried Details and works!

At the moment Accordion has been implemented in the way, that it allows only one panel to be opened at the time.

https://github.com/vaadin/vaadin-accordion/issues/25

Thanks Mr. Tatu Lund,

Before opening any panel, I have closed previously the rest of panels in the accordion,
but no other panel can be opened programmatically.