Retirement refund from another state

I took a refund on my retirement contributions from a plan in California, but I lived in NY all last year. Do I need to file taxes in California for the refund despite not living in that state 2023?