Do not light a fire in any of your dwellings on the Sabbath day.
How did they keep warm on the Sabbath day?
Biblical Hermeneutics Stack Exchange is a question and answer site for professors, theologians, and those interested in exegetical analysis of biblical texts. It only takes a minute to sign up.Sign up to join this community
It says "Don't kindle a fire," not "don't allow a fire to be burning." The prohibition is on the act of lighting a fire, not of having a fire be lit.
Having a fire burning to generate heat, or a candle lit to create light, is perfectly permissible- provided that everything is set up before the Sabbath.
(Stoking the fire, or adding fuel, is prohibited on the Sabbath since it's considered as an act of kindling. Likewise, there are some rabbinic prohibitions enacted in later generations to prevent people from accidentally stoking the fire. This is all laid out clearly in the classic codification of Jewish law, Shulchan Aruch, Orach Chayim Chapters 253-259.
But on a Biblical level, as long as everything is set up before the Sabbath there is no problem at all.)
Most probably they wore more clothes. But see this previous question & answer here
There may be a different reason for this commandment than most people assume. They were commanded to prepare food on preparation day, the 6th day, to have enough food to eat on the sabbath (Ex. 16:23). Another way to ensure that women were able to rest just as the men were able to rest, was to make sure there were no cooking fires lit.
And, in general, the work prohibition was mainly job related. For profit work, the increase of their crops, the trading for lands for gain, etc was enriching themselves. The focus of the 7th day was for rest and worship, to remember that God created all that they worked for. It was not meant to prohibit all actions, as Jesus clearly made evident through healing on the Sabbath.
"10 And, behold, there was a man which had his hand withered. And they asked him, saying, Is it lawful to heal on the sabbath days? that they might accuse him.
11 And he said unto them, What man shall there be among you, that shall have one sheep, and if it fall into a pit on the sabbath day, will he not lay hold on it, and lift it out?
12 How much then is a man better than a sheep? Wherefore it is lawful to do well on the sabbath days." (Matt. 12:10-12, KJV)
So, flipping a light switch is not for-profit work and does not fall under the commandment.
How did Yisraelites keep warm on Yom Ha-Shabat (י֖וֹם הַשַּׁבָּֽת)?
Requirement-1 : Rest (Shabaton, שַׁבָּת֖וֹן)
Shemot 35:2 [MT] : "Six days work may be done, but on the seventh day you shall have a holy Shabat rest to the Lord; whoever performs work on-it shall be put to death. (שֵׁ֣שֶׁת יָמִים֘ תֵּֽעָשֶׂ֣ה מְלָאכָה֒ וּבַיּ֣וֹם הַשְּׁבִיעִ֗י יִֽהְיֶ֨ה לָכֶ֥ם קֹ֛דֶשׁ שַׁבַּ֥ת שַׁבָּת֖וֹן לַֽיהֹוָ֑ה כָּל־הָֽעֹשֶׂ֥ה ב֛וֹ מְלָאכָ֖ה יוּמָֽת)
Requirement-2 : Do Not ( לֹא ) Kindle ( תְבַעֲר֣וּ ) Fire ( אֵ֔שׁ )
Shemot 35:3 [MT] : "You shall not kindle fire in-all of your dwellings on the-Shabat day." (לֹֽא־תְבַֽעֲר֣וּ אֵ֔שׁ בְּכֹ֖ל מֽשְׁבֹֽתֵיכֶ֑ם בְּי֖וֹם הַשַּׁבָּֽת )
Kindling Fire (with sticks) is not permitted. - Numbers 15:32-35
Bamidbar 15:32 [MT] : "When the children of Yisrael were in the desert, they found a man gathering wood on the-Shabat day." (וַֽיִּהְי֥וּ בְנֵֽי־יִשְׂרָאֵ֖ל בַּמִּדְבָּ֑ר וַיִּמְצְא֗וּ אִ֛ישׁ מְקשֵׁ֥שׁ עֵצִ֖ים בְּי֥וֹם הַשַּׁבָּֽת )
Bamidbar 15:34 [MT] : "They put him under guard, since it was not specified what was to be done to him." (וַיַּנִּ֥יחוּ אֹת֖וֹ בַּמִּשְׁמָ֑ר כִּ֚י לֹ֣א פֹרַ֔שׁ מַה־יֵּֽעָשֶׂ֖ה לֽוֹ)
Bamidbar 15:35 [MT] : " And YHVH said to Moshe, The man shall be put to death" (וַיֹּ֤אמֶר יְהֹוָה֙ אֶל־משֶׁ֔ה מ֥וֹת יוּמַ֖ת)
What are Alternate Methods for Heat on Yom Ha-Shabat (י֖וֹם הַשַּׁבָּֽת)? :
Does Shemot (Exodus) 35:3 mean Yisraelites cannot stay in their tents? -No.
Does Shemot (Exodus) 35:3 mean Yisraelites cannot wear layers of clothing in their tents? - No.