This is a good question and may be best answered by a qualified tax adviser.
Even the IRS provides an unclear answer:
“The IRS has not issued guidance on how these federal tax credits will interact with State or local rebates. However, in the past, it has worked like this:
If your state/local rebate was […]