Onmyoji Were Also Officials in Charge of Astronomy and Calendar Studies
Due to the influence of novels and manga, Onmyoji currently have an image of beings who exterminate vengeful spirits with magic and shikigami, but there were also Onmyoji who were like national public servants performing calendar creation. Many of the Tsuchimikado family, descended from Abe no Seimei, served as the head of Onmyo-ryo (Bureau of Divination).
The calendar methods and Yin-Yang Five Elements theory transmitted from China in the 6th to 7th centuries are rooted in Japanese lifestyle habits even today. The Zodiac of Jikkan Junishi (Ten Celestial Stems and Twelve Earthly Branches) is known to everyone, and calendars like Risshun (start of spring) and Keichitsu (awakening of insects) are heard as things indicating the change of seasons.
Onmyodo dealt with studies related to nature observation such as astronomy, calendars, time, and divination, which have a close relationship with the Yin-Yang Five Elements theory. From the Nara period to the middle ages when vengeful spirits and curses were still believed in, they also became beings who handled divination and magic to avoid disasters.