EI 5791 then FR 188 at Madrid
Dublin → Madrid → Edinburgh
Timetable, Madrid time
13:50EI 5791 from Dublin at the gate
05:55FR 188 to Edinburgh leaves the gate
16 h 05 apart on the timetable, overnight
FR 188 leaves 16 h 05 after EI 5791 arrives on the timetable: more than half a day, so not a connection we count.