For New York domiciliaries, spending 30 days or less in New York State during the tax year is one of three requirements for the Group A nonresident exception. You must also maintain no permanent place of abode in New York State during the tax year and maintain a permanent place of abode outside New York State for the entire tax year. Any part of a day in New York State counts as a full day.
https://www.tax.ny.gov/pit/file/pit_definitions.htm
New York 30-Day Safe Harbor
Stay 30 days or less in New York State