I found this sentence, of which I understand the general meaning, but can't really grasp the role and implication of the last part:
As far as I understand:
呼ばれてやってきた電気屋が調べたところ: After the technician I called checked
故障の原因室外機の基板が壊れている: The cause of the failure was the substrate of the outside unit was broken
The 「こと」 after that nominalize the sentences, like "The thing that the substrate of the outside unit was broken was the cause of the failure", but I can't understand the 「にあるとのことだった」 part; I tried searching a bit on Google, but I'm not even sure how to parse it and how the single part works together, like I don't know what the 「と」 after 「にある」 is supposed to mean.
It seems like it means something "[The technician] said that", like a formal versione of 「と言った」, and a native Japanese confirmed that it means something like that, but I wasn't really able to grasp the meaning of the whole structure.