The Wiki article on Ganesa says.
In Hindu temples, Ganesha is depicted in various ways: as a subordinate deity (pãrśva-devatã); as a deity related to the principal deity (parivāra-devatã); or as the principal deity of the temple (pradhāna)
I have also heard about Kshetrapala deities.
Kshetrapala (Sanskrit: क्षेत्रपाल, romanized: Kṣetrapāla) is a guardian deity featured in Indian religions. According to Hindu mythology, a kshetrapala is the guardian deity of a consecrated land or farmland. Kshetrapala became a generic name applied to deities associated with a piece or parcel of land, or a particular region (Sanskrit: Kṣetra).
What does scripture say about different types of temple-deities?