If you have residences in two states, it will depend on which state you spend over 183 days in.
And they may require you to log each day.
Friends of the family moved to DE, but kept there MD house for a while. MD went after them for state tax. They had to prove (the log above) that they spend more than half the year in DE.
How do you keep a log?