cancel
Showing results for 
Search instead for 
Did you mean: 

Let's discuss: creating powerful automations with our new script editor!

kelanfromgoogle
Community Manager (Admin)
Community Manager (Admin)

Hey everyone!

This week, we released the script editor, a tool for creating advanced home automations, on Google Home for web and the Google Home app. Learn more about it in our community blog:
New to Public Preview: create powerful automations with our script editor.

 

You can unlock the full potential of home automation by building advanced, personalized automations. Here are some examples that can be done only in the script editor:

 

We'd love to hear about how you are using the script editor. Share your favorite use cases for the script editor, and your automation scripts in the comments below!

 

Here are some helpful guidelines for sharing your automations in the Community discussion forum: 

  • Use clear and concise titles in your post. For example, Automation Script: Water the lawn in the mornings.
  • Include why you created the automation. Describing what this solved for you may inspire others to try it out. For example, "My schedule can vary a lot during the week so it's helpful to add a few conditions to create the automation flexibility I need."
  • Share the script in text format. Copy and paste your automation script so that other users can learn from what you’ve created.

  • Do not include personal information. To ensure your safety, security, and privacy, make sure your custom automation doesn’t include any personal information you don’t want to share.
  • Use the category “Sharing an Automation.” Using the correct category helps other community members find your post.

 

166 REPLIES 166

Hearntd
Community Member

Hi, I've looked but can't see anyone trying this (sorry if this has been covered).

I'm looking to setup an automation, where is any one of my 3 Nest Thermostats call for heat, then they will trigger a relay, but then if they no longer require the heat it will turn the relay off.

I have cracked "on" part, but I cannot work out what option to use for the "off" on the thermostats? 

ON

- type: device.state.TemperatureSetting
state: activeThermostatMode
is: heat
device: Kitchen - Kitchen

OFF

- type: device.state.TemperatureSetting
state: activeThermostatMode
is: ?
device: Kitchen - Kitchen

 

Once I crack this part I will then look at the conditions so that all 3 need to be "off" before the relay will turn off.

Thanks for any help

Trevor Hearn

dwploc
Community Member

Just created a new automation to turn on/off Christmas lights.  I now get this warning that I don't get on any other automation that turns light off and on.  Is this new in the editor?

  • [OnOff] applied to [Family Room Tree - W1 - Christmas Lights] could impact the safety, security, and/or privacy of your household.

dwploc
Community Member

The following script does not run.  It gets a"safety"  warning on the action.  Looks like their examples.

 

metadata:
  name: test # 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:
      - type: device.state.OnOff
        state: on
        # [available operators: is, isNot]
        is: true
        device: Chair Light 2 - Office
    actions:
      - type: device.command.OnOff # Turn the device on or off.
        # Whether to turn the device on or off.
        on: true
        devices: Credenza Light 1 - Office

 

After some more testing, if I turn the light on manually (with control) it does not recognize change of state.  

Guess that makes sense

ParaKan
Community Member

Hi!

The execution log for my scripted automations appears to halt abruptly after several executions. The log starts again if I deactivate and activate routines. Because of this, it’s not possible for me to know if the scripts are running or not. As you can see, there's a gap in log entries from the 11th to the 17th of November, resuming only after I deactivate and activate the routine.

execution log.png

automations:
  starters:
    - type: device.state.MotionDetection
      state: motionDetectionEventInProgress
      is: true
      device: Living Room Sensor - Living Room
  condition:
    type: and
    conditions:
      - type: device.state.TemperatureControl
        state: temperatureAmbient
        lessThanOrEqualTo: 21C
        device: Living Room Sensor - Living Room
      - type: time.between
        before: 01:00
        after: 06:00
  actions:
    - type: device.command.OnOff
      on: true
      devices: Living Room Heater - Heating

Any idea why this is happening? Thanks!

What kind of sensors do you use? I am using Tapo T100 motion sensors and starters don't seem to work because nothing happens when movement is detected.

Hello, I'm using Phillips Hue motion sensors. The problem I previously mentioned resolved itself a few days after my post. Since then, I've occasionally noticed delays in automation execution.

luisnomad
Community Member

Looks very promising! It's not working for me, For example Tapo T100 motion sensors don't seem to trigger any action in Google Home (they do in Tapo, I can see it in the native app). But if this improves and provides real support for Google enabled devices, it will be awesome! I will keep revisiting to see the improvements 🙂