Turn off a sensor?

I have a motion sensor, its great when I want it to be working (when I am away) however it can really flood my logbook when I am home.

Is there any way to turn sensors off in HA?

I can turn it on and off with a relay I have attached to my Pi and just cut the power but I was wondering if there was a way to do this through HA on the software side.