Is It Sunnah to Say Salam When No One Is Home?
Question

I have heard from many people here that when you enter your home you should say SALAM even if no one is at home (just say it to yourself). Is it right? If so what is the DALEEL for that?
Praise be to Allah.Saying Salam Upon Entering the House
Saying Salam when entering the house is recommended, not obligatory, whether there is anyone in the house or not.
Abu Dawud (5096) narrated that Abu Malik Al-Ash`ari (may Allah be pleased with him) said: The Messenger of Allah (peace and blessings of Allah be upon him) said: “When a man enters his house, let him say, `Allahumma inni as’aluka khayr Al-mawlaj wa khayr Al-makhraj. Bismillah walajna wa Bismillah kharajna wa `ala Allahi rabbina tawakalna (O Allah, I ask You for the best entering and the best exiting. In the name of Allah we enter and in the name of Allah we leave, and in Allah our Lord we put our trust),’ then he should say Salam to his family.” (Classed as authentic by Al-Albani in As-Silsilah As-Sahihah, 225)
At-Tirmidhi (2698) narrated that Anas ibn Malik (may Allah be pleased with him) said: The Messenger of Allah (peace and blessings of Allah be upon him) said to me, ‘O my son, when you enter upon your family and say Salam, it will be a blessing for you and the members of your household. Al-Albani said in Takhrij Al-Mishkah (4652): this Hadith is sound when all its chains of narration are taken into account.
These two Hadiths show that it is recommended for a man to greet his family with Salam when he enters his house.
Saying Salam When There’s No One Home
With regard to it being recommended for a man to say Salam to himself when entering a house where there is no one, the scholars quoted evidence for that.
The general meaning of the verse (interpretation of the meaning): {But when you enter the houses, greet one another with a greeting from Allah (i.e. say: As-Salamu `Alaykum — peace be on you), blessed and good.} [An-Nur 24:61]
An-Nawawi (may Allah have mercy on him) said in his book Al-Adhkar (p. 49):
It is recommended to say Bismillah (in the name of Allah) and to remember Allah a great deal, and to say Salam, whether there is any human being in the house or not, because Allah says (interpretation of the meaning):
{But when you enter the houses, greet one another with a greeting from Allah (i.e. say: As-Salamu `Alaykum — peace be on you), blessed and good.} [An-Nur 24:61]
Al-Hafidh Ibn Hajar (may Allah have mercy on him) said:
It comes under the general meaning of spreading Salam, and saying Salam to oneself when entering a place where there is no one, because Allah says (interpretation of the meaning): {But when you enter the houses, greet one another with a greeting from Allah (i.e. say: As-Salamu `Alaykum — peace be on you)…} [An-Nur 24:61]
Some commentators – such as Ibn Jarir – interpreted the verse as meaning “greet one another” [as in the translation of the meaning quoted here]. This is like the verse in which Allah says (interpretation of the meaning): {And do not kill yourselves (nor kill one another).} [An-Nisa’ 4:29]
Al-Qurtubi (may Allah have mercy on him) said: The more correct view is to say that this is general and applies to everyone who enters a house. If there is a Muslim person in the house he should say “As-Salamu `alaykum wa rahmat-Allahi wa barakatuhu (peace be upon you, and the mercy of Allah, and His blessings).”
If there is no one there, he should say, “As-Salamu `alayna wa `ala `ibad-Illah is-salihin (peace be upon us and upon the righteous slaves of Allah).”
If there is someone in the house who is not a Muslim, he should say, “As-Salam `ala man ittaba`a Al-Huda (peace be upon those who follow true guidance)” or “As-Salamu `alayna wa `ala `ibad-Illah il-salihin (peace be upon us and upon the righteous slaves of Allah).”

That is narrated from some of the Companions.

Al-Bukhari narrated in Al-Adab Al-Mufrad (1055) that Ibn `Umar (may Allah be pleased with him) said: “When you enter an uninhabited house, say “As-Salamu `alayna wa `ala `ibad-Illah is-salihin (peace be upon us and upon the righteous slaves of Allah).”
Al-Hafidh Ibn Hajar (may Allah have mercy on him) said: Its chain of narration is good; It was also classed as sound by Al-Albani in Sahih Al-Adab Al-Mufrad (806)
Mujahid (may Allah have mercy on him) said: When you enter the mosque, say, “Al-Salam `ala Rasul-Illah (Peace be upon the Messenger of Allah),” and when you enter upon your family, greet them with Salam, and when you enter a house in which there is no one, say “As-Salamu `alayna wa `ala `ibad-Illah is-salihin (peace be upon us and upon the righteous slaves of Allah).” (End quote from Tafsir Ibn Kathir, 3/306)
For more details, please see the following answers:
Du’a for Entering the House
Guidelines on seeking permission to enter
Giving Salam is Sunnah when joining a gathering and when leaving it
Does a Muslim Need Permission to Enter His House?
When to Seek Permission to Enter Someone’s House
And Allah knows best.