Automation of Smart Homes with Multiple Rule Sources