ZigBee is enabling technology of Home automation which designates an emerging practice of increased automation of intelligent appliances and household applications. ZigBee has many advantages of high availability, low power consumption, low cost which ideal for residential setting. But, security features in ZigBee networks which required a number of keys, consisting of master keys, network keys, link keys and don't offer various services depended on users. This paper proposes an application of attributed-based cryptography for security in ZigBee networks. The proposal offers various services in ZigBee networks using attributes, and reduces the number of keys which is useful in automation where various electronic devices communicate each other.