Basic code for automating house lights