Continuing the discussion from Hey, Google… When I come home after dark, turn on the flood lights:
I’d love to know if anyone else has tried their hand at writing Google Home Routine scripts, and if so, what you’ve come up with.
Just for reference, Google’s Documentation is at this link: Write scripted automations with the script editor - Google Nest Help
Here are the steps again that I used to get started with these custom routines and get some help from their AI Script Writer Assistant:
- On a computer, go to home.google.com , while signed into the Google account you have associated with your Google Home.
- Click
Automations
on the left
- You’ll see a list of your current automation. Click
Add new
in the lower right-hand corner.
(You may be prompted to join Public Preview) - On the right-hand side, enter a prompt for AI to turn into a script. Just type what you want Google Assistant to do, using natural language.
I shared my first example as a solution to my wish for my floodlights to come on any time I came home after dark. That one has been serving me well.
Here’s my latest problem-solving routine:
Problem: When I charge my Google Nest Camera, it doesn’t indicate the charging status. I have no way to know when the battery is full, except to walk outside and either stare at the camera to try to determine if the charging light is still blinking, or unplug the camera from the charger, and check the app.
Solution: Write a custom routine that notifies me when the camera battery status is “Full”.
metadata:
name: Camera Charged
description: Notifies when the driveway camera's battery is charged
automations:
- starters:
- type: device.state.EnergyStorage # The state of an energy storage device such as a battery, including the amount of energy it is storing, whether or not it is charging, and whether or not it is plugged in.
device: Driveway camera - Driveway
state: descriptiveCapacityRemaining
is: FULL
actions:
- type: home.command.Notification
title: Battery is full
body: Camera battery is full