There is nothing in the constitution or Federal Law saying that electors are required to vote the same way that their state has voted. Some state do include it in the state laws or constitution that their state representatives must vote the same as their states popular vote.