As per the Legends, Demon Shambasura after receiving the boon from Lord Siva started troubling Sages. Sages know that this Demon can only be killed by Yama Dharma Raja and approached him for the protection. Yama battled with the Demon for years and lost in the battle. Seeking more power, Yama did penance for Lord Siva. Lord Siva who was Sirsa Asana posture did not respond for a long time. Knowing this Goddess Parvati gave him the additional powers with which he Killed the demon. Hence this name after Yama as Yama Puri which later turned to Yanamadduru. On Yama's request, Lord Siva manifested here in Yoga posture with His Consort Parvati and son Subramanya. As Siva manifested here with Shakti, this temple was called by Shakteeswara.