It's the same register, just the lower bits are for external sensor and the higher ones are for controller temperature. Making the if() statement True and adding the following below the print() statement in the if() statement should give you the value (as batTemp):
valName = "mode=\"batTemp\""
valName = "{" + valName + "}"
dataStr = f"Renogy{valName} {float(battery_temp)}"
print(dataStr, file=fileObj)
valName = "mode=\"batTemp\""
valName = "{" + valName + "}"
dataStr = f"Renogy{valName} {float(battery_temp)}"
print(dataStr, file=fileObj)