Automate Battery Powered LEDs

I have a battery powered (3xAA 1.5v) Led light accessory I want to add to home assistant. My initial thoughts were to use ESP home on a D1 Mini. Using the power from the D1 pins. Its a very small current draw.

Can I just attach some leads to the power inputs on the battery pack direct from the GPIO ports on the D1 Mini and use a standard ESP home Switch template? I know the outputs are 3.3v is there a way to get 5 without extra components?

short answer: no

you need an “Amplifyer” minimum one Resitor from GPIO to basis of Transistor to level shift.