Look at the sentence that is in Italic. I wonder if had had there is the past-perfect or is it the Past Simple followed by 'had to'? I'm confused.
Helen stepped outside her front door to see what the weather was like. It was sunny and warm. That was nice, because for the past two weeks it had been cold and rainy. It had been so cold that she had had to turn her heater on. She was lucky, because her heater worked and she could pay her heating bills.