HA Control 3V Monochromatic LED Strip with ESPhome and ESP32

hi,
I’m trying to control a simple monochromatic 3V led strip
https://www.dfrobot.com/product-2399.html
with Esphome and an ESP32 (Devkit C)

I searched in the example and just used the ledc platform.

output:    

  - platform: ledc
    pin: GPIO27
    id: gpio_27
    frequency: 100 Hz
    max_power: 50%

light:

  - platform: monochromatic
    output: gpio_27
    name: "TV Light"

I want to control the strip with a switch on the dashboard.
unfortunately it turns only one for few sec and then off and also disconnect the ESP32.
I imagine it isn’t ideal to control the Led Strip directly without a mosfet, because of current and heat, and when supplied with a direct 3V it draws ~50 mA (more than an IO can give).
Anyway I thought that with the PWC control I can reduce the power.

I have tried to add it to a switch / automation control but cannot make it work
can it be done, how?

thanks

Just an update if someone will ever need it:

the circuit works now, just added an NPN transistor (BC548) with the base controlled from the ESP32, the collector to 5V and then the emitter to the 3V of the Led Strip. But the circuit worked well only once I soldered the few connections on a board, when only insertred on a breadboard I still had unstability problem…