Is there a way to turn off switch when there is motion ? Or is there already an app for this?

Many people agree with you, me included!

Here’s what’s currently officially available:

And there are some rules engines that have been built by community members for others to use. Not officially supported, but quite popular. See the following topic: