Buzzer configuration

hello to all I would like to set up a buzzer in home assistant but I was not able to do it who helps me
connected directly to the raspberry
buzzer

Start by reading this: https://www.home-assistant.io/integrations/rpi_gpio/#switch

If it is not a 3.3V buzzer you are going to have to drive it with a transistor:

The 5V or 12V supply should match your buzzer voltage.

thank you so much problem sloved