A dozen state legislatures are pushing measures to launch or expand programs that rely on customers’ thermostats, batteries, ...