Buttons and Switches (Portal 2)
There are various types of buttons and switches used in Portal 2. The process of creating them has been simplified greatly since the original Portal; whereas several models and triggers were needed for the original devices, only one entity is needed for each of the buttons and switches in the newer game.
Tip: For organization, consider using logic_relays triggered by buttons/switches to interact with other portions of the map. This is especially recommended when dealing with instances, as it may be necessary for the logic to function correctly.
Thanks to all those who helped write the original Buttons (Portal 2) page, as most of the content here is taken from or derived from there.
Switches
Newer Switch
To create the newer Aperture Pedestal Switch in Hammer, place a prop_button entity (yes, that's right--no func_buttons or anything). You can use OnPressed and OnButtonReset for firing outputs when the button is pressed and when it resets; for coop mode there are also OnPressedBlue and OnPressedOrange outputs for when the switch is pressed by Atlas and P-Body respectively. You can also choose between Clean (rebuilt facility) and Rusted (decrepit/overgrown) skins. For more info see the entity's page.
Older Switch
The procedure for creating the switch seen in the 1940s through 1980s Aperture Labs is very similar to the process for the Newer Switch; simply use a prop_under_button instead. The entity has the same outputs and keyvalues.
Buttons
Newer Button
To create the newer Aperture Science 1500 Megawatt Supercolliding Superbutton in Hammer, place a prop_floor_button. The button can be activated by the player or storage cubes, and has outputs similar to the switches: OnPressed, OnUnpressed, OnPressedBlue, and OnPressedOrange. You can also find a button setup in the SDK's provided instances.
Older Button
As with switches, construction of the 1940s through 1980s button is similar to that of the newer one; simply use a prop_under_floor_button. It has the same outputs except it is apparently missing the coop-player specific outputs.
Newer Cube-Specific Button
Created by placing a prop_floor_cube_button. A version of the button that is square, mostly because it is activated by a prop_weighted_cube. Has the same outputs as the older button. Outputs are the same as the older button
Newer Sphere-Specific Button
Created by placing a prop_floor_ball_button. A version of the button that is round and smaller, mostly because it is activated by a prop_weighted_cube with CubeType set to Sphere. Outputs are the same as the older button.