Many Indian homes have a totem of one lemon and seven chilies hanging at the entrance of the front door, to ward off evil spirits. The belief is that the Goddess of Misfortune likes sour and spicy food. So if she finds this totem before entering a home, she eats it and leaves the home satisfied. The family escapes any misfortune she could have caused.
JG is 59 years old and my mother. She grew up in India with a very religious Hindu family, before immigrating to the USA. Her parents were spiritual and superstitious. As a child, she participated in lots of rituals that were believed to provide good luck.
I remember seeing my mom do this sometimes, when I lived with my parents before I moved to college. Now I know the superstitious and traditional reasoning behind why she does it. I also see that this ritual reflects a relatively unique aspect of Hinduism – they have goddesses/supernatural creatures associated with everything, both good and bad. They have goddess of wealth and fortune, but on the flip side they also have a goddess of misfortune. I think this is really interesting.
This ritual is definitely not rooted in proven scientific facts, as there is no logical connection between the foods you hang outside of your house and your luck. However, it probably has origins in ancient Hindu myths and texts.