Esphome software serial with WeMos d1

Hi everybody,

I have a question regarding to software serial in esphome. I try to use modbus with a max385.
And I configure it like that:

  id: mod_bus
  tx_pin: D2
  rx_pin: D1
  baud_rate: 9600
  stop_bits: 1

  flow_control_pin: D3
  id: modbus1

  - id: inverter
    address: 0x1
    modbus_id: modbus1
    setup_priority: -10

This is only a part of the configuration
Can I use any pin for soft serial because I don’t get connection to the modbus system.