One switch for many rpi_gpio

Hi all, I would turn on many gpios using just one switch.
In particular I I have three gpio connected to rpi3 and I would like turn on or off them individually with 3 different switch or all together with another switch. This is possible in your opinion?
thank you really much
Best regards

Yes. Use a group to switch them all as one, use the individual switches to switch them individually.

Alternatively if you only need this in Lovelace and not automations or scripts the entities card has a header toggle option that will switch all items in the card ( which can still be switched individually).

Thank you really much tom_I,

I used group and it works.
Just another question: it is possibile to turn_on/off a group with google assistant?
I noticed that google assistant see all switches I defined, but not group of switches.

thank you really much again
Best regards

I don’t know unfortunately. I don’t use google assistant.

You could create an input_boolean and expose that to Google Assistant as a switch. Then have an automation that toggles the group and use the input_boolean as the trigger. Alternatively, set up a routine in Google Assistant, so you give a command and Assistant turns all the switches on or off.