Subletting (paying rent) in NY temporarily tax return

If I temporarily subletted (paid rent) several rooms (not at the same time changed location each time since they were temporary) in NY while working remotely would that mean I would owe NY tax if I was a resident of another state?

 

If so, do I need to put the exact address of the multiple sublets or just that it was in NY for my tax return?

 

The landlords did not give official approval for the tenant to sublease so would that cause any issues for me, the tenant I subletted from or the landlord?

 

Thank you