RelayBoard module with Home Assistant to control garage door

I have tried MYQ and this did not work all the time and the MYQ get stuck for 30-50 seconds and that is not acceptable. So, I am going to remove the MYQ and replace it with 5V relay board. I have directly wired this to the two garage door switch. So, if I hook up a 5V 2 Channel DC 5V Relay Module with Optocoupler High/Low Level Trigger Expansion Board to home assistant with Raspberry Pi 4 how do I control the relay board in home assistant? Do I need to install ESPHome to work the relay? If so, then is there are examples that I can see how this works?

24W 12v power supply

2 pcs 5V 2 Channel DC 5V Relay Module with Optocoupler High/Low Level Trigger Expansion Board. https://www.amazon.com/dp/B079FGPC9Y?psc=1&ref=ppx_yo2ov_dt_b_product_details

Thanks

James

A pi4 is a bit OTT for this use. Quite a powerful device just to switch a garage door or two.

It would be more economical to use an esp8266 or esp32 and esphome.

EDIT Also you seem to have purchased a 12v power supply for a 5v relay. Why?

Oh, I purchased the 12v power supply for the LED lights and I did not mean to put these on this discussion. Please disregard this.

So, you saying the pi4 (Home Assistant installed) has a way to open the garage door without the relay? The reason I went the direct wiring is because there is no wifi connection in the garage. I cannot use the esp8266 or esp32 with no WIFI.