Take-homes filter well when scoped honestly and waste your weekend when they are not.
What is reasonable
Two to four hours, a self-contained problem, and the same task given to everyone. Ask directly how long they expect it to take, and hold them to it.
When to push back
If the task is real production work, ask whether it is paid. If it is over six hours, ask whether a shorter version or a live session would do. A good employer will accommodate; a bad one tells you something useful.
Submitting well
Include a readme: what you built, the decisions you made, what you deliberately left out, and what you would do with two more days. Reviewers consistently rate this higher than extra features.
Common questions
Should I be paid for a take-home assignment?
For a short scoped exercise, no. For work the company will actually use, yes.
How long should I spend on a take-home?
No more than the stated time. Overrunning is not rewarded and can count against you.