Dimming switch for Wall lights?

Hi,
I recently bought one of these - https://dcilluminated.com/collections/superhero-logo-lights-collection/products/superman™-led-wall-light-pro-version
which is basically a large wall light connected via a power cable.
The power cable is a 12V 2A ouput to a barrel jack.
This barrel jack connects to another piece which contains a “switch” where a long press turns the light on/off, and shorter presses successively dim the lights.
This “switch” consists of a barrel jack in on one end, and a barrel jack out on the other end, which then directly connects to a cable with a barrel jack in coming from the light.

I want to make this setup controllable from HA. What do I need to add to this to control the on/of as well as the dimming of the lights from my HA?
Thanks

Just add a relay or mosfet in-line (replacing your dimmer switch completely).

A $5 esp based device with mosfet suggested by the @system should be good enough (don’t forget to install esphome on it :warning:)

Alternatively the same device exist with smaller footprint and case - just need to fix some USB-A to barrel jack adapter :point_down:

image

Well, difficult to anwser as we don’t know anything about the hardware insights. But - in case the switch acts just as a primitive pwm dimmer (chances are not low) - the devices just suggested will also be able dimming your lights :raised_hands:

Thank you! Will be implementing this soon and reporting back!