I didn’t dare mess with Google Home’s scripts before ‘Help me script’ came along

I didn’t dare mess with Google Home’s scripts before ‘Help me script’ came along

google home script editor web help me script

Rita El Khoury / Android Authority

TL;DR

  • Google Home’s web script editor is getting a new “Help me script” feature.
  • The generative AI feature creates all the code for you from scratch when you tell it what routine you want.
  • It’s currently rolling out as an experimental feature in Public Preview on Google Home web.

The Google Home script editor has been out for a few months now, but I haven’t dared touch it with a ten-foot pole despite my love of smart home automations and routines. The extent of my coding abilities can be resumed in “I understand a bit of HTML” so you can imagine that I’ve been reticent to mess with YAML, ruin my existing smart home setup, and interfere with existing automations from my Philips Hue lights, Tado thermostats, and other smart home devices.

But during its Pixel fall event, Google also announced a bunch of new generative AI capabilities coming to its services, including a new “Help me script” feature to help semi-nerdy people like me write script code from scratch. This is now beginning to roll out and I went hands-on with it.

How to get “Help me script” in Google Home

google home web script editor help me script 4

Rita El Khoury / Android Authority

After a month’s wait, Google says that “Help me script” is rolling out starting today, November 7, as a “limited-time experimental feature in Public Preview” in the web interface for Google Home. All the automations you create with it will still be accessible in the mobile app but as view-only.

To enable it, you should go to home.google.com on your desktop computer and log in with your Google account. Click the blue + Add new button on the bottom right, and then Try it below the Help me script column on the right. Read the terms and conditions then click I agree (and optionally agree to let Google use your interactions to improve its AI models), and you’re good.

From now on, each time the script editor is open, the script helper will show up in the rightmost column, ready to answer your prompts with all the necessary code.

Script help is a great start if you don’t know what you’re doing

I’ve had access to the generative AI script helper in Google Home for a couple of days now. In my experience, it can get you 80% of the way to a functioning script, but it still makes mistakes and messes up simple commands or device names. In a way, it’s quite reminiscent of Google Bard: the answers look absolutely perfect until you really look at them and discover some obvious cracks. But this is still an experimental feature, so we’ve all already been warned. Just don’t go in expecting perfect code and you’ll be good.

When I’m away, remind me that I should vacuum

The first command I asked for is something I’ve wanted to automate for years now. I have a Roborock S7 MaxV Ultra vacuum ($1399 at Amazon) that I often want to start when I’m away from home but I always forget to — like 19-times-out-of-20 forget. Then I come back home and I’m annoyed at the still-dirty floors. Since I work from home and don’t have a preset away schedule, scheduling a routine is pretty challenging. Really, I just want a notification that reminds me, “Hey, you’re away, do you want to vacuum?” The default Google Home mobile app’s Away routine can’t control anything besides lights — no vacuum, no notification — so scripts it is.

google home web script editor help me script 5

Rita El Khoury / Android Authority

I told the script generator what I wanted and it gave me the code in an instant. A quick glance, though, reveals that it chose the action of starting the vacuum (which isn’t something I want to do every time I’m away) instead of sending me a notification to ask if I wanted that. I had no idea if the script generator supported notifications, so I reformulated it with a less confusing notification request and hoped for the best.

google home web script editor help me script 7

Rita El Khoury / Android Authority

This time, it got the notification code right — and turns out that’s supported! All I had to do was edit some of the text to make it work for me. I renamed the script, clarified the description, picked the exact notification text I wanted, and added myself as the recipient of the notification. I tested it out and voilà! Now, each time Google Home detects that the apartment is empty, it’ll surface a notification to remind me about starting the vacuum. Ideally, I’d want a button that opens the Roborock app so I can pick the mop or vacuum mode (something I can’t do with Google Home), but for now, this solves my big forgetfulness problem.

google home script notification vacuum away mode

Rita El Khoury / Android Authority

The code wasn’t foolproof, but it got me 80% there without me knowing how to write the script, which parameters were required, and even whether or not I could send notifications or expand the home/away functionality. I didn’t have to read the documentation to get those parts right. So let’s call it a win.

Turn on the ambiance lights when I watch sports on my TV

Whenever I open the RMC Sports app on my Xiaomi TV, it means that I’m watching sports — usually football (the real one). I want my Hue Play lights to turn on behind the TV and my living room’s Nanoleaf Canvas on as well, with the regular light dimmed out. But again, since there’s no automation, I often get lazy and don’t do it. A perfect waste of smart lights.

Sometimes, you have to use multiple prompts and piece the code together.

It took a bit of trial and error to get the right code for this automation, but it finally worked. I had to rephrase my request a few times and piece together the bits of code it got right each time (condition, opening the right app on the TV, different lights dimmed versus on), but here’s the result.

google home web script editor help me script 13

Rita El Khoury / Android Authority

Beware of the wrong commands and device names

As I was testing out different scripts and commands, I came across several instances where the generated code had errors, and ones that Google should’ve definitely gotten right. When you try to Validate the code (bottom left) before saving it, you’ll see all the errors and will have to troubleshoot your way through them.

Mistaken command codes

google home web script editor help me script 8

Rita El Khoury / Android Authority

In this first instance above, I asked the script writer to write me a command that plays music on a Nest speaker (i.e. issue a Google Assistant “play some music” command) when I turn on the lights during a specific time interval. It got almost everything right, except the command type: device.command.OkGoogle. After reading the interminable error pop-up, I realized the correct type is assistant.command.OkGoogle. Fixing that one word fixed the error, but Google should’ve known the right command.

google home web script editor help me script 9

Rita El Khoury / Android Authority

Mistaken device names and attributes

google home web script editor help me script 10

Rita El Khoury / Android Authority

In this other example, the script generator gave me an invalid device name. After looking at it for a while, I realized it had doubled up the name of the device: Levoit Levoit Air Purifier instead of Levoit Air Purifier. Since Google knows my devices’ names (as evidenced by the pop-up), it shouldn’t put the wrong ones in the code it generates.

google home web script editor help me script 11

Rita El Khoury / Android Authority

The same goes for the air purifier’s speed. I’d specified I wanted it set to 3 in my prompt, but the code decided it’ll set it to speed_high, which is not supported. The error pop-up told me three is a valid choice, so I just replaced it. And ta-da, the automation works!

google home web script editor help me script 14

Rita El Khoury / Android Authority

“Help me script” is the gateway to Google’s powerful smart home script editor

google home web script editor new

Rita El Khoury / Android Authority

Look, I’m under no illusion that this script generator is perfect in its current experimental phase. A couple of days of tinkering have already revealed to me many of its shortcomings, but I still consider that as a net positive because I did, indeed, spend a couple of days tinkering with it.

Without the script generator, I don’t think I would’ve ever “wasted” hours trying to understand how to write commands in YAML and learning all the capabilities of the feature. It acted as an excellent gateway for me to get into script writing and start discovering all the powerful things I can automate. Features and conditions that are nowhere near accessible in the Google Home mobile app’s regular Routines suddenly become an open playground here.

The script generator is a net positive. I spent hours tinkering with automations I never would’ve tried on my own.

I now know I can set up much more powerful home and away modes, notifications when things happen, intricate and/or/not conditions for each trigger, multiple actions with delays, and automations between devices from different brands that normally don’t speak to each other. That’s much more than I thought was possible, and it’s all a couple of prompts away.

All Google really needs to do is to make it better and more foolproof before releasing it to the public. Not everyone will have the energy or time to troubleshoot these erroneous device names and commands that should’ve been right from the start.

Leave a Reply