There is now a fork of esphome with modbus support Read modbus with ESP32 and ESPHome - #19 by nikito7