Section 27. No ordinance or regulation of a city or town, or regulation or restriction imposed in a grant of location, affecting the erection, maintenance or operation of a line for the transmission of electricity for light, heat or power extending or intended to extend from some point in one city or town through or to some point in another city or town, shall take effect until approved by the department of telecommunications and energy.