06-19-2023 08:17 AM
Should this work? I have two starters, both using assistant.event.OkGoogle. Whichever one I place first responds correctly. Trying to invoke the 2nd one just gets me a "bong".
(update. this morning it's not recognizing either one. sometimes playing music!)
metadata:
name: Office three
description: Scripted automation
automations:
- name: test 1
starters:
- type: assistant.event.OkGoogle
eventData: query
is: "Test Office Off"
actions:
- type: assistant.command.Broadcast
message: Test 1
devices: Office speaker - Office
- name: test 2
starters:
- type: assistant.event.OkGoogle
eventData: query
is: "Test Office On"
actions:
- type: assistant.command.Broadcast
message: Test 2
devices: Office speaker - Office
06-19-2023 12:18 PM
I'm just a user and I just got access to scripts a few days ago but in every example google provided the structure of scripts with several automations is the same:
metadata:
name:
description:
automations:
- starters:
- type:
condition:
type:
actions:
- type:
I don't think -name: test 2 is the expected structure. You can try this code and see if it works:
metadata:
name: Office three
description: Scripted automation
automations:
- starters:
- type: assistant.event.OkGoogle
eventData: query
is: "Test Office Off"
actions:
type: assistant.command.Broadcast
message: Test 1
devices: Office speaker - Office
- starters:
- type: assistant.event.OkGoogle
eventData: query
is: "Test Office On"
actions:
type: assistant.command.Broadcast
message: Test 2
devices: Office speaker - Office
06-19-2023 03:48 PM
Thank you for trying to help.
I've tried it both with and without the - name. No difference. Also, there is an example in their documentation of multiple automations which uses this structure, the only significant difference being that the example is using scheduled events as starters instead of OkGoogle.
06-20-2023 10:58 PM - edited 06-20-2023 11:59 PM
I opened a similar thread a few days ago where a Googler that's active on here said they'll look into it. Please look at that issue briefly and give it kudos if it's the same. Thank you!