Where do you live the rest of the year? NY? Do you ever work in the state of NY?
Most people do not need to pay taxes to the state they are not living or working in. The only exception to this would be if you do not meet the Convenience of the Employer Rule that NY has.
So if your employer only withheld for NY and you do meet the Convenience of the employer rule, you would allocate 0% (IF you did not live in NY at all) to NY and then the rest of it to CA and the other state you lived in. This would give you a full refund of the taxes paid to NY.
If you live in NY as well as CA, then you would allocate it based on the number of days you lived in each state.
If you do not meet the Convenience of the employer rule, then you would need to include 100% of your wages on your NY return and then claim a credit on your CA return for the taxes paid to NY while a resident of CA.