The home heating thing is interesting, since burning gas for that is roughly 100% efficient. Burning gas for electricity maxes out in the best possible case at 60%, and then there's some tranmission loss (though I suppose gas leaks from pipes need to be counted as well then).
But, electric heat pumps don't generate heat but, as the name suggests, "pump" it from one place to another, so they can be more than 100% efficient, generating something like 2-3x the input energy for air source, or up to 5 for ground source pumps. Which puts electrity ahead again (especially as some of that electricty can come from low carbon sources rather than gas).
But, electric heat pumps don't generate heat but, as the name suggests, "pump" it from one place to another, so they can be more than 100% efficient, generating something like 2-3x the input energy for air source, or up to 5 for ground source pumps. Which puts electrity ahead again (especially as some of that electricty can come from low carbon sources rather than gas).