Our teacher, the Beit Yosef, wrote in section 5: A lamp of idleness, meaning that he does not need it—it is forbidden to light it. But that of the beit knesset is not considered of idleness, and it is permitted to light it even on the second day of Yom Tov after Mincha; and there is no concern in this of "preparing for a weekday," for in its lighting there is a mitzvah for that moment. And to prepare the wicks and the glass lamps on Yom Tov after Mincha: if he wants to light it on that day—it is permitted, and if not—it is forbidden. Thus far his words. It is called a lamp of idleness when he does not need to illuminate at all. But if he wants to add much light—it is certainly permitted, and this is part of the delight of Yom Tov. And even if his intention is to show his wealth—nevertheless, there is automatically honor for the day (Taz, subsection 8). And there are those who hesitate regarding this (see Magen Avraham, subsection 12, in the name of Yam Shel Shlomo). And regarding that of the beit knesset, the Rashba forbids it entirely, for it is only for honor, and this the Torah did not permit. And as for there being a mitzvah in this, it is even worse, for "for you"—and not for the Most High. However, the Rosh and the Tur permitted it, and wrote that this is not a lamp of idleness. And specifically according to the opinion of the Rambam, kindling was permitted entirely, for we say "since," and also this is for the honor of the community. And the world has followed the custom of permission. Nevertheless, one should warn them not to increase them excessively. And specifically on the day of remembering souls, when they increase without measure, one should prevent them from this. And after Mincha when they light—behold, there is a need for that moment. But to prepare the lamps and the wicks for the night—it is obvious that it is forbidden. And so too to set up the lamps from the day for the night—it is forbidden unless they light them while it is still day. And when they light in the beit knesset it is permitted, even when people have not yet come, since they will come while it is still day. (This matter of a lamp of idleness—it is in the Yerushalmi, Meshilin. And it is not clear to us according to the opinion of the Rosh and the Tur, for if so, what is this lamp of idleness? For would he be so mad as to light entirely for idleness? And if it is for some purpose, such as to smoke tobacco with it—behold, it is certainly permitted. And if it is for a non-Jew—it is obvious that it is forbidden. If so, for what is he lighting? And it requires further study.)
כתב רבינו הבית יוסף בסעיף ה: נר של בטלה, דהיינו שאינו צריך לו – אסור להדליקו. אבל של בית הכנסת לא חשיב של בטלה, ומותר להדליקו אפילו ביום טוב שני אחר מנחה; ואין בזה משום מכין לחול, שהרי בהדלקתו יש מצוה לאותו שעה. ולתקן הפתילות והעששיות ביום טוב אחר מנחה: אם רוצה להדליקו בו ביום – מותר, ואם לאו – אסור. עד כאן לשונו. נר של בטלה מקרי כשאינו צריך להאיר כלל. אבל אם רוצה להוסיף אור הרבה – וודאי מותר, וזהו מעונג יום טוב. ואפילו כוונתו כדי להראות עשרו – מיהו ממילא יש כבוד היום (ט"ז סעיף קטן ח). ויש מפקפקין בזה (עיין מגן אברהם סעיף קטן יב בשם ים של שלמה). ושל בית הכנסת אוסר הרשב"א לגמרי, דאינו אלא לכבוד, וזה לא התירה התורה. ומה שיש בזה מצוה מיגרע גרע ד"לכם" – ולא לגבוה. אמנם הרא"ש והטור התירו, וכתבו דזה אינו נר של בטלה. ובפרט לדעת הרמב"ם הותרה הבערה לגמרי, דאמרינן "מתוך", וגם זהו מפני כבוד הציבור. והעולם נהגו להיתר. ומכל מקום יש להזהירם שלא להרבות הרבה. ובפרט ביום הזכרות נשמות, שמרבין בלי שיעור, ויש למונעם מזה. ואחר מנחה שמדליקין – הרי יש צורך לאותה שעה. אך לתקן הנרות והפתילות על לילה – פשיטא שאסור. וכן להעמיד הנרות מיום ללילה – אסור אלא אם כן מדליקין מבעוד יום. וכשמדליקין בבית הכנסת מותר, אף כשעדיין לא באו בני אדם, כיון שיבואו מבעוד יום. (הך דנר של בטלה – הוא בירושלמי משילין. ולא נתברר לנו לדעת הרא"ש והטור, דאם כן מהו זה נר של בטלה? דאטו ישתגע וידליק לבטלה לגמרי? ואם בשביל איזה דבר, כמו לעשן בה הטאבא"ק – הרי וודאי מותר. ואם בשביל אינו יהודי – פשיטא שאסור. ואם כן למה זה הוא מדליק? וצריך עיון.)