Help with ESPHome Configuration: Emulating a Remote Control for LED

I am absolutely new to ESPHome and am trying to implement the following:

I have a NodeMCU V3. A remote control for a LED lamp is connected to it via octocoupler. I would now like to implement the button press action in ESPHome in a suitable lamp configuration. The buttons are already connected (via the octocouplers) to the GPIOs of the NodeMcu.

I have the following 6 buttons available on the remote: ON/OFF/Brightness+/Brightness-/Temp+/Temp-.
The lamp can be dimmed steplessly and change temperature steplessly between 3000-6500K.

I need help to create an ESPHome configuration (platform: color_temperature).
How do I manage that the GPIOs are set to true for a short time for the change between ON/OFF or the dimming and temperature adjustment?