US 20160132030 illustrate a smart home system for automating operation of the smart home devices (e.g., thermostats, lighting devices, household appliances, etc.) based on aggregation of individual user routines. User mobile devices and smart home devices can incorporate pattern detection logic to identify patterns in the user's behavior (e.g., going to particular places at particular times or invoking particular operation functions of a smart home device at particular times). A coordinator (e.g., user smartphone) can receive information about detected patterns and analyze the information to detect an aggregate pattern. Based on the detected aggregate pattern, the coordinator can identify the operational behavior to automate (e.g., turn off the lights when the last user goes to bed) and implement the automated behavior by establishing the automation rule that reflects the detected aggregate pattern.