Detects if your on or off, then makes a broadcast relevant to whether it's on or off, and then decides what to do.