How to keep a service from running during a certain time period

ok. this means that the google assistant is not integrated to your HA. This means that google devices cannot control devices in HA. For what you want, i,e to disable motion detection while the switch is turned on with google home, we should be able to control HA with our google home. There are 3 months to do this. Either you can integrate Google Assistant to HA, but this needs your HA instance to be accessible from outside your network. Or you can use Nabu case which is the cloud side of HA, this needs 5USD subscription per month. Or you can you node red which is free but you have to construct a flow for each switch in HA. If you want to control the entire HA instance with Google home, you should go with either of the first two. For a limited number of switches, node red method is the best. Which do you want?

I have nabu casa integrated to google home to get my Veraplus information, the motion sensor and smart lock as they are both z-wave.

Ok. Then its cool. First you just have to create a input_boolean in HA and expose it to Google assistant. After this complete the setup of this input Boolean in google assistant. After that we have to create two routines- one for turning on this light and other for turning off. You can use any trigger command for these two routines but make sure that in the routine which has to turn on the light, you also add a second action that is to turn on this input_boolean on. And in the routine to turn off the light, you add the second action turn off the input boolean. This means that when you call the first routine, it will turn on the light and also the input Boolean. And when you call the second routine it will turn off the light and also input Boolean.
If this is finished we just have to add one thing to nodered flow, i,e to check the state of this input boolean before turning off the light.

So if you have turned on the light with google home, it will also turn on the input boolean which makes sure that the command to switch off the light wont work until you turn of the light with google home.

Thanks, that did what I wanted. Maybe one of these days I’ll be able to figure this all out.

Happy to help…