Can I toggle a connected socket with an WLED ESP8266 Button detection?

I’m creating my own beadhead and I’ve added some LED Strip in it.
I’ve also planned to add a switch to toggle it on/off with a “WLED button detection” input. It means that I’ll have an ESP82 with WLED inside the badhead and a switch connected to it to trigger some macros for on/off states of the strip.

Would it be possible to somehow get the state of another button with my this same ESP82 on Home Assistant to control a connected socket ( where my floor lamp is connected ) ?