Read the sentence.

My dog, Stella, loves to go for walks in good weather but refuses to step outside if it is raining.

What is the function of the word but in the sentence?