HSA Contribution - Allocation to State

Later in March I will be making a contribution to my HSA for the 2019 tax year. I lived in both NY and IL during 2019. What options do I have to allocate the contribution to state? Will it matter for state tax purposes?  I will need to file as a part-year resident in both NY and IL.