05-28-2024 10:01 AM - edited 05-28-2024 10:02 AM
I want to write a script that opens or close a curtain depending on which google nest mini device received the command but I cant seem to find the command type for that, any ideas?
I wrote an example snippet of what I want to achieve those this piece of code isnt valid.
metadata:
name: Curtain Automation
description: Opens the curtain in the living room or master bedroom based on your location when you say "Hey Google, open the curtain".
automations:
starters:
- type: voice
phrase: "Hey Google, open the curtain"
conditions:
- type: location
is: Living Room
- type: location
is: Master Bedroom
actions:
- type: conditional
condition:
- type: location
is: Living Room
actions:
- type: device.command.OpenClose
open: true
devices: Living Room Curtain
- type: conditional
condition:
- type: location
is: Master Bedroom
actions:
- type: device.command.OpenClose
open: true
devices: Master Bedroom Curtain
Answered! Go to the Recommended Answer.
05-30-2024 10:31 AM
Google Assistant currently doesn't support a way to directly target the specific Nest Mini device that received the voice command within the Script Editor.
Use a single Nest Mini and assign different phrases to each room. For example, for Living Room: "Hey Google, open the living room curtain"
05-31-2024 06:09 PM
- type: assistant.event.OkGoogle
eventData: query
is: "close the curtains"
devices: Office speaker - Office
can devs please add a device struct to the assistant.event.OkGoogle event, this will solve this issue.
05-30-2024 10:31 AM
Google Assistant currently doesn't support a way to directly target the specific Nest Mini device that received the voice command within the Script Editor.
Use a single Nest Mini and assign different phrases to each room. For example, for Living Room: "Hey Google, open the living room curtain"
05-30-2024 10:34 AM
I dont want to have to specify each room or curtain, english is not my first language and I twist my tongue when prompting long sentences
05-31-2024 05:51 PM
Whenever I say "Hey Google, turn off the spot light" it sometimes turns off the spot light in another room. Do I have to say "Turn of the living room spot light" while I am currently in the living room because that is a really weird way to prompt
05-31-2024 06:09 PM
- type: assistant.event.OkGoogle
eventData: query
is: "close the curtains"
devices: Office speaker - Office
can devs please add a device struct to the assistant.event.OkGoogle event, this will solve this issue.