08-11-2023 10:51 AM
Hello. I am trying to set up an automation that will make my hue lights blink after a timer has completed on my Google Home Hub (1st Gen). The name of the Google Home Hub (per the Google Home app is "Kitchen Display". Below is the code I've attempted to write but I keep running into a YAML syntax error in the "condition" part of the script below. Any guidance on what I could be doing wrong (note i'm not a linux coder so this was as best of a try as possible and there are potentially other errors in the script 😞 )
link to the code: https://goonlinetools.com/snapshot/code/#4dla8bfp39j4iargwy0nn
08-11-2023 01:09 PM
It seems some YAML syntax error. However, I want to say is about "device.state.Timer" this condition. After I try about this condition, I found it is not usable in script editing now. Now, the editor will deem it as an array but not a condition. Therefore, the editor will not allow you to use this condition and successfully save it even if you have the correct syntax. Timer as a condition seems too early for the script editor. Sorry if I am wrong.
08-11-2023 01:46 PM
First of all, an OkGoogleEvent doesn't need the "Hey Google" wake word within the query. You have already asked the Assistant to start listening for commands with the starter - so having 'Hey Google' in the query is unnecessary. Example provided here.
Secondly, the condition usage syntax is incorrect. Have you read the developer documentation?
Supported starters, conditions, and actions
https://developers.home.google.com/automations/starters-conditions-and-actions
According to the dev docs, the only valid key for TimerState is timerPaused. The documentation claims that TimerState is a supported device struct but when I tried to create a TimerState starter, device.state.Timer wasn't shown as an option on the autofill list, nor was it on the condition autofill list. Possibly that particular device struct is limited to displays, and since I don't have one, it would explain why I'm not given the TimerState option.
08-11-2023 08:01 PM
i guess it appears the Google Home Hub (Gen 1) do not support timers and therefore this will not work. a very odd decision as the Google Home Hub works when I say set a timer for XX on the device. Is there a way to check which devices "TimerState" works on?
Further, even in my initial starter, it appears you cannot have a dynamic timer request (ie you cannot say "please start a timer for XX minutes" you would have to put in "please start a timer for one minute" "please start a timer for two minutes" etc as the "starters" condition
08-11-2023 08:25 PM
Presently, it appears that TimerState isn't even a functional device struct, as it's supposed to be. If I am understanding the documentation correctly, the TimerState struct is solely dependent on the timer being paused for a specified duration, but you're trying to use it in a currently unsupported running state.
If you want to set a dynamic timer duration, you could try using an open ended OkGoogleEvent starter to see if the Assistant will ask for the timer's duration setting.
starters:
- type: assistant.event.OkGoogle
eventData: query
is: Set a timer
Even still, it's not possible to blink lights based on a timer running for greaterThanOrEqualTo 5sec because the only supported key is paused.
08-11-2023 08:39 PM - edited 08-11-2023 08:39 PM
I tired the open ended event and at least on the Google Home Hub, it does nothing. Assistant does not ask me "how long would you like the timer for"
It's too bad that this automation would not work. It seems only Alexa has determined that timers status is something people would want to interact on
Thank you very much for your support and assistance!