Using an MCP23017 HW-839 SPI (not I²C) breakout board with ESPHome as GPIO expander

Tags: #<Tag:0x00007f3274ac7828> #<Tag:0x00007f3274ac7030>

I need a GPIO expander to control 8 relays using NodeMCU and ESPHome, so I got an MCP23017 breakout board. The problem is, the seller told me that apparently this board is configured to run at SPI mode, not I²C. Is there a way for me to use this board with ESPHome? Or do I have to get another GPIO expander that runs on I²C mode?

The board I have is identical to this one from AliExpress. I bought the exact same board from a local e-commerce website in my country.

https://www.aliexpress.com/i/32881199103.html

According to the specifications, the MCP23017 has the I2C Interface, and the MCP23S17 the SPI Interface.

You’re right! It turns out the board I got is MCP23017, which uses I²C (not SPI because that would be the MCP23S17 version). The seller just didn’t know that much about the product he/she’s shipping to me. Without jumping any of the address pins, I was able to figure out that the default address is 0x20 enabling the I²C scan on the I²C component. I tried jumping some of the address pins to VCC or GND and the address changed.