One may not operate an elevator on Shabbat. Pressing the elevator buttons involves Torah prohibitions or, minimally, rabbinic prohibitions. However, some “Shabbat elevators” are set to operate automatically, meaning that they are set before Shabbat to stop on every floor or every other floor, at which point the doors open on their own for a predetermined amount of time and then close on their own. The elevator then continues on its way. There is a difference of opinion among the poskim regarding these elevators.
Some prohibit using a Shabbat elevator, maintaining that using it is a weekday activity. Additionally, entering the elevator causes its motor to use more electricity when the elevator goes up and down (Ĥelkat Yaakov, OĤ §144; Minĥat Yitzĥak 3:60; Ĥut Shani vol. 1, p. 206; R. Shmuel Wosner).
Others maintain that one may go up in a Shabbat elevator but not down. This is because when the elevator goes down, the extra weight helps produce electricity. Thus one who rides the elevator has a hand in generating electricity (R. Levi Yitzĥak Halperin, Ma’aliyot Be-Shabbat).
A third opinion maintains that a Shabbat elevator may be used. Since the settings are in place before Shabbat, and no action needs to be taken on Shabbat to make the elevator work, there is no prohibition. The fact that the elevator has a system that determines the weight of the passenger, which in turn tells the motor how much power to use, and even makes use of the additional weight to produce electricity, is of no interest to the rider. As long as the elevator goes up and down according to its settings, the passenger does not care about the elevator’s electricity-conserving mechanisms. Therefore, the actions caused indirectly by his entry into the elevator are not attributable to him at all (it is a psik reisha de-lo niĥa lei via grama; this is the position of R. Yosef Eliyahu Henkin; R. Isser Yehuda Unterman; R. Shlomo Zalman Auerbach in SSK 23:58; Prof. Ze’ev Lev in Teĥumin 2; and R. Yisrael Rosen in Teĥumin 5.)
In practice, the lenient position is the primary one, while those who are stringent are commendable. In a case of need, even those who are normally stringent may be lenient. Those who are lenient must be careful not to enter or exit the Shabbat elevator when the door is about to close, so as to avoid causing it to reopen. Even for those who are lenient, it is better if the automatic system is programmed under the supervision of an organization that specializes in halakha and technology, as this can help ensure that entering the elevator does not turn on a light or the like and minimize the prohibitions involved according to the stringent view.