Of course they do.
The state legislatures appoint electors who agree that they will vote the way the legislators want - in most cases for the winner of that state's popular vote.
It isn't binding and you could conceivably have a 'faithless' elector, but only reliable electors are going to get appointed.
I really don’t think voters are going to put up with an elector selling them out. Electors can be reliably depended on to vote the will of their state’s voters.
I am sure the state can pass no law as to how an elector will cast her or his vote based on other state totals. I see it as wholly unconstitutional.
The issue is a state law vs. the US Constitution. There shouldn’t even be a question in court.