what are these? ?

Ok, these came off the '72 scamp I sold to a buddy of mine. Factory V8 a/c car from California. One obviously is the Speedo cable, but what is on the end of it with the wire coming off ? And the other part is mounted on the pass firewall. Know clue what that is for!