06-17-2023 09:29 AM
I am using new script editor for automation. My goal is to get a part of the `eventData` in `assistant.event.OkGoogle` as a variable, but couldn't get it to work. I couldn't really find a complete example of variables being used.
Can you share a complete script where a variable is defined and used only with `assistant.event.OkGoogle` starter and `assistant.command.Broadcast` action for simplicity?
I'm not sure if this is even possible. Having a complete example of variable usage in documentation can make it clear their capabilities.
06-17-2023 09:41 AM
Hi @Ula - thanks for your question. Variables are not yet supported in the script editor but I would encourage you to vote on the relevant idea in this thread where other users are also suggesting similar ideas.
06-17-2023 09:49 AM
Thanks for your quick response.
Just to be clear, I can see variables are documented here. Are they not supported for cases like mine, or not supported at all?
06-17-2023 10:03 AM
Yes, variables are in early stages of implementation. We will update our documented examples when they are fully available. Your use case of dynamically storing part of `eventData` in a variable is not yet supported.
12-15-2023 08:34 PM
It looks like the documentation about variables only shows how they can be defined, and have default values, but there is no example as to how to assign a value to a variable, say from a value we got from a sensor. Is it ready at all? Any update would be appreciated. Thanks.
10-03-2023 02:39 AM
Any update on when the documentation might be ready? I'm keen to use variables. I want to use one to create a reference to a device (so I can change the device assigned to the variable and then use the variable throughout the script. Saves having to change every occurance of the device name. But I can't see how to assign a value to the variable , specifically a device.
10-04-2023 06:08 PM
yeah +1, any timeline that can be provided?
10-08-2023 02:35 PM
https://developers.home.google.com/automations/schema/basics#variables
I can find variables in your documentation - but for me it does not work yet. Is this feature activated at all?