Trying to build an ESP32 C6 zigbee end device with 6 gpio commands

I am completely new building a zigbee device with an ESP32 C6, so excuse me if as i am starting for scratch …
My goal is to build an end device which will have six leds driven from home assistant , and a button to command some entity in HA.
So i will have the leds and the button connected to the ESP32 GPIOs.
I have read all the zigbee library examples, and other codes i found on github but i just don’t understand how a GPIO is connected to an endpoint, i can’t see any code line which associate a GPIO pin to an endpoint.
i would appreciate any help…

Are you looking to do this in something like Tasmota or ESPHome?
Either should fit the bill. Both have lots of guidelines and examples in their official documentation.
Add a few resistors and you should be fine to configure it all into HomeAssistant.
Good luck!

Thank you for your answer.
My first thoughts were to use the Arduino IDE, but you are right, ESPHome or Tasmota would be an easier way…( i didn’t notice Tasmota was able to build zigbee devices)

I built this test fixture many moons ago, I understand the esp libraries I used have been updated and my code no longer compiles. That said, I still have one of these running non-stop since I compiled it way back. Only one GPIO was tested, however the Arduino code should be expandable if you update code to current ESP Arduino libraries and make code changes as per the folks that modified my initial work.

The selection between Zigbee, espHome and Tasmota most likely depends on your current device platforms and whether you want to add to your current platform or add a new platform to your HA universe.

Good hunting!