These measures add to more than 40 California cities that have updated building electrification codes — yet a “controversial exemption” in San Jose could turn the tide.