Hi NightSpeed,
sorry, I'm not sure if I do understand everything.
So, your TV works fine with the learned IR-Codes.
For the fan I can see you tried two different codes. One for "turn fan on" and one for "turn fan PowerOn". Does any of those work? How did you try to learn each of the codes (Plugin/Website)?
"NEC" does just mean, that the Beam recognized that the IR code uses the NEC codec. If no codec is recognized, the BEAM will use raw codes, which will be longer but other than that work in the same way.
EDIT: Good catch, Kalle!