01-03-2025 02:12 PM
Wish:
I enter via Gemini the voice command "TestCommand", i've programmed an automation with the script editor that has the starter -> assistant.event.OkGoogle with the trigger "TestCommand".
The action is to turn of our Garden Lights.
The Garden Light are also combined with our motion detection in the garden. Which turns the lights off, when 5min nobody has moved.
So, when i give the command "TestCommand" the lights should stay on, till i give the command "Ok Google, turn off garden lights". After 5min the garden lights turn off, because nobody has moved.
Can i suppress the motion detectors with an action "suppressFor:" or is this only working at the starters.
Or Somebody have an work around for me.
Thanks Google to all this possibility they gave us for FREE!!!!!!
Keep on improving!
Answered! Go to the Recommended Answer.
01-09-2025 08:45 AM
Unfortunately, the suppressFor
action can typically only be used within triggers (such as a device status change or event) and may not apply directly to the kind of situation you're describing where you need to suppress a motion sensor in real-time after an action.
To prevent your garden lights from turning off automatically after the "TestCommand" while still using motion detection, you can create a temporary override.
Create a Virtual device: In your smart home system (like Home Assistant), create a virtual switch or a helper entity. This will act as a flag to control the motion sensor's behavior.
Modify Motion Sensor Automation: Adjust your motion sensor automation to include a condition check. If the helper entity is in the "on" state, the automation should skip the action that turns off the lights.
"TestCommand" Action: When you say "TestCommand," your Google Home script should turn the helper entity "on." This effectively disables the motion-triggered light-off action.
"Turn Off Lights" Action: When you say "Ok Google, turn off garden lights," the script should turn the helper entity "off." This restores the normal behavior of the motion sensor automation.
This approach allows you to temporarily override the motion sensor's default behavior, keeping the lights on after the "TestCommand" while still utilizing motion detection for automatic shut-off when you're not actively interacting with the system.
01-09-2025 08:45 AM
Unfortunately, the suppressFor
action can typically only be used within triggers (such as a device status change or event) and may not apply directly to the kind of situation you're describing where you need to suppress a motion sensor in real-time after an action.
To prevent your garden lights from turning off automatically after the "TestCommand" while still using motion detection, you can create a temporary override.
Create a Virtual device: In your smart home system (like Home Assistant), create a virtual switch or a helper entity. This will act as a flag to control the motion sensor's behavior.
Modify Motion Sensor Automation: Adjust your motion sensor automation to include a condition check. If the helper entity is in the "on" state, the automation should skip the action that turns off the lights.
"TestCommand" Action: When you say "TestCommand," your Google Home script should turn the helper entity "on." This effectively disables the motion-triggered light-off action.
"Turn Off Lights" Action: When you say "Ok Google, turn off garden lights," the script should turn the helper entity "off." This restores the normal behavior of the motion sensor automation.
This approach allows you to temporarily override the motion sensor's default behavior, keeping the lights on after the "TestCommand" while still utilizing motion detection for automatic shut-off when you're not actively interacting with the system.
01-25-2025 03:58 PM
Thanks for that answer, i made the same work around with the google playground outlet. Not the finest way for a solution but it works. Maybe YAML will allow variables in the future.
01-25-2025 04:20 PM
Okay i just found that you can add "devices" to the google playground. So i have the possibility to use "variables"
Thats really fine. Now i can create outlets with the right names and use it as booleans.