The new law could provide cities federal aid during heat waves that could be dangerous, that require more than the capabilities of state and local authorities.