Motion sensors are a useful way to automate lights and other tasks in your smart home.