Read modbus with ESP32 and ESPHome

Modbus code is in esphome - as you point out. However it is not a component. It is a base for other components, pzem is an example.

Nothing to do with SPI afact.