These switches were typically installed inline on lamp cords or pendant lights, allowing users to turn devices on and off without reaching for a wall switch. Push-button cord switches were commonly used in electrical lighting and appliances from the late 19th century through the mid-20th century.
eBay