Is my State of Residence NY if I lived in NY for more than 183 days in 2017 but I lived in foreign country as of December 31st?

Hello all. I was lived in NY between January 1st and August 1st. I am currently living outside of the US because of work. In this case, what should I put for "State of residence (on December 31, 2017)"?