This is a VERY GOOD idea.
Get these laws onto the books, as soon as possible.
More importantly, the states should confer with each other, to keep the various state laws as "uniform" as possible (with an eye on a Supreme Court challenge down the line).
I would go further than just protecting the use of internal combustion engines in cars and trucks.
There need to be laws on the state level that guarantee "the freedom to use energy" in whatever usages to which that energy can be applied.
To wit, the use of petroleum-based products to operate vehicles, machinery, produce electricity, heat homes, etc.
And the use of natural gas for heating, cooking, power generation, industrial and agricultural production, etc.
The use of wood for heating, cooking and for other traditional uses.
Etc.