Room automation light control - programming problem

They're evil and should be banned from the language.

Evil? No, I don't think so. Bad? Most of the time, yes.

Banned? No, I don't think so. They can almost always be avoided, but there ARE rare cases where they are needed. On an Arduino? I don't think so, but they should not be removed from the C language.