Controling Arduino

Hi,
I started a new project based on Arduino Nano ESP32. The main purpose is that I have several relays that light the driveway lights in different patterns depending on where someone is walking from and triggering the sensor. Now I want to add a button on the dashboard in HA that will send information to the arduino to run the program and turn on the lamps. My question is, has anyone already done something like this and can help connect Arduino to HA this way?