06-18-2023 01:43 PM
Should "assistant.command.OkGoogle" work for use with Google TV? The validation passes, but when executed nothing happens.
In the below script, my Google TV is turned on through the onOff action, but nothing else happens. I've also tried the OkGoogle alone, without the onOff. I also tried tell me the weather as described in the documentation.
Is there a way to see the reason why a command fails? (A log of some kind?)
Device: Chromecast HD - Android TV 12 Build STTE.230319.00.R1
I also didn't see it in my activity log (https://myactivity.google.com/myactivity?pli=1&product=31)
https://developers.home.google.com/automations/schema/reference/entity/assistant/ok_google_command
metadata:
name: test google tv automation # Choose a short name that summarizes important starters and actions, like “Sunset lights”.
description: Scripted automation # Write a detailed description that includes everything the automation does, like “At sunset, on weekdays, close blinds, turn on lights to 50%, and play the sunset playlist on certain speakers.”
automations:
# “starters” and “actions” are required; “condition” is optional.
# Use Ctrl + Space to see autocomplete suggestions.
# ---- STARTERS ---- #
# Starters describe events that will start the automation.
# To add more than one starter, duplicate the "- type" section under "starters".
# If you add multiple starter events, any one of them happening will start the automation
starters:
- type: assistant.event.OkGoogle
eventData: query
is: test automation
# ---- ACTIONS ---- #
# Actions will start when a starter event takes place and all conditions are met.
# Actions will start in the order they appear in the script, and with any delay specified.
# To add more than one action, duplicate the "- type" section under "actions".
actions:
- type: device.command.OnOff # Turn the device on or off.
on: true
devices: Travel TV - Travel
- type: assistant.command.OkGoogle
okGoogle: launch netflix
devices: Travel TV - Travel
06-20-2023 11:49 PM
Yeah, in my limited testing, it seems like if your using assistant.event.OkGoogle as a starter, then the devices field for assistant.command.OkGoogle is ignored and instead the command is executed on the device that you said the OkGoogle command to.
Try changing the starter, or just executing the script manually from https://home.google.com/automations using the play button. If that works, then that corroborates what I am noticing. Thank you!
07-15-2023 10:56 AM
Thanks for responding! I see you already got your confirmation. I was out of town, but now home and see the behavior as you stated. I also noticed that my Android/Google TV devices are no longer being displayed as options under devices for the type of `assistant.command.OkGoogle`.
This works for me to the start playing a hulu show on my google tv, where the associated hub video config is set to send to the tv as well. if i don't turn on the tv via command on first, often times by the time the device wakes up the tv, the play video fails to start.
automations:
# Update "starters", "actions" and optionally "condition" sections to create an automation
# Duplicate these three sections under "automations" to add more automations in the same script
starters:
# Use Ctrl + Space to get autocomplete suggestions
- type: assistant.event.OkGoogle
eventData: query
is: just do it
actions:
# Use Ctrl + Space to get autocomplete suggestions
- type: device.command.OnOff # Turn the device on or off.
on: true
devices: Kitchen TV - Kitchen
- type: assistant.command.OkGoogle
okGoogle: play always sunny in philadelphia on hulu
devices: Kitchen display - Kitchen