06-15-2023 10:46 AM - edited 06-15-2023 11:07 AM
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:
07-06-2023 01:08 PM
Is Motion detection available for Nest Protect or Doorbells or Nest Hubs?
I don't have device.state.motion as a starter option. Is it because I don't have devices that support this?
As a summary of the various and very much in-the-Google-ecosystem of devices on my home network:
4 Nest Thermostats, 10 Chromecast w/ Google TV devices, 9 Nest Protects, 11 Nest Cameras, 7 Nest Hubs, 2 Nest Doorbells, ~20 Nest Speakers, and ~30 Wemo Switches not to mention Nest Wifi Pro router with 2 access points.
07-06-2023 01:15 PM
No it's not currently available using the Google script editor. As others have mentioned though the API exists as it's possible to do within Home Assistant.
A month or so back Google accidentally released motion detection events for automations, they didn't work and was quickly removed. So it's definitely something that's being worked on.
07-07-2023 04:41 AM - edited 07-07-2023 05:36 AM
07-07-2023 10:12 PM
Yes, I use them in a Home Assistant application but look forward to them being available to setup in the Google Home app so I can hopefully move off of having to host my own third party app for home automation.
07-07-2023 11:56 AM
I really hope this builds into us accessing 3rd party device's specific settings, like scenes 7 routines on Govee or Hues. Very much looking forward to playing with this!
07-13-2023 04:34 PM
Hi Guys, this looks like an interesting release product. Congrats, good job.
In my case, I have in mind to announce some message when an event has happened.
Maybe an event in a topic using pub/sub or some webhook that google home give me to expose.
Specific Scenery: I have a custom application, every day at night I organize all my next day tasks hour by hour.
Sometimes I start to do any task and the time happens, and I forgot my next task. I would like google home to announce at that hour that I have to continue with the next task, then I need to connect with an external app.
07-16-2023 03:29 PM
Am I misunderstanding the supported states of the device.state.OpenClose type? I get an error message every time I validate a scripted automation that uses openState as state but openPercent state does not return any validation error. Even the dev docs only cite openPercent as a supported device.state.OpenClose state.
Is openState a supported state or not?
07-17-2023 02:55 AM
Thanks
Looking forward to seeing what everyone is creating. We are here to help if there are any questions.
07-21-2023 06:35 AM - edited 07-21-2023 06:37 AM
I made a routine where, when opening the living room door (door sensor), it checks if it is between sunset and sunrise and if the living room light is off. If so, it turns on the hallway light and notifies you through the loudspeakers that someone has opened the door. It's working 100%.
# ------------------------------------------------------------------------------------------ #
# Lines starting with “#” are comments and will be ignored by the automation.
# Indentation determines hierarchy within the script.
# Visit g.co/home/script-editor-docs for full documentation.
# By: CHNeves on 2023-07-21. v1.0
# ------------------------------------------------------------------------------------------ #
metadata:
name: LuzPortaAbre
description: Ligar a Luz ao abrir a porta
automations:
# “starters” and “actions” are required; “conditions” are optional.
# Use Ctrl + Space to see autocomplete suggestions.
# ---- STARTERS ---- #
# Starters describe events that will start the automation.
# To add more than one starter, duplicate the "- type" section under "starters".
# If you add multiple starter events, any one of them happening will start the automation
starters:
- type: device.state.OpenClose
state: openPercent
is: 100
device: Porta Da Casa - Sala de estar
# ---- CONDITIONS ---- #
# Conditions are optional. Delete this section if it’s empty.
# Conditions will prevent an automation from starting if the conditions aren’t met.
# See g.co/home/script-editor-docs for documentation about how to use logical operators like “and”, “or”, and “not”.
condition:
type: and
conditions:
- type: device.state.OnOff
state: on
isNot: true
device: Luz da Sala - Sala de estar
- type: time.between
before: sunrise+10min # Adjust offset as needed. Supported units: sec, min, hour
after: sunset-15min
# ---- ACTIONS ---- #
# Actions will start when a starter event takes place and all conditions are met.
# Actions will start in the order they appear in the script and with any delay specified.
# To add more than one action, duplicate the "- type" section under "actions".
actions:
- type: device.command.OnOff # Turn the device on or off.
on: true
devices:
- Luz do Corredor - Corredor
- type: device.command.SetVolume # Set the volume of a given device.
volumeLevel: 45
devices:
- Google Home - Sala de estar
- Google Nest - Corredor
- type: assistant.command.Broadcast
message: "Alguém abriu a porta da sala"
devices:
- Google Home - Sala de estar
- Google Nest - Corredor
Congratulations on this new scripting option.
I also suggest putting different lock options (and, in Brazil, models like Intelbras).
It would also be important to have variable options. For example, it would be possible to roll back the previous volume if there were variables to use.
I would also like to know if Google Nest Hub and Google Nest Hub Max will implement the Brazilian Portuguese language in them?
Regards,
CHNeves
07-28-2023 12:50 PM
On the finger lock
07-29-2023 12:07 AM
Hello ,
I m making different scripts and very happy with it btw , but whenever one of those commands are involved , it doesn't work at all but rest of the actions are fine. Is it because my assistant is in French or because i do a multiple automatin in the same scrit?
- assistant.event.OkGoogle
- assistant.command.Broadcast
Thanks
Alex
07-29-2023 03:50 PM
@kelanfromgoogle wrote: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:
- Flash lights when carbon monoxide detected
- Scheduled lighting with multiple times
- Turn on air purifier when indoor air quality is poor
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
I have a problem with an automation script. I need my Google Mini to announce that the gate is open too long, in case I forget it open. However, I need it to only announce when it remains open for more than 5 minutes. The device.state.OpenClose option has the "for" key, but when I use it in automation, as soon as I open the gate it already makes the announcement and after 5 minutes it announces it again. Can anyone tell me if I'm using it doing this wrong? automation follows:
- starters:
- type: device.state.OpenClose
state: openPercent
is: 100
device: Gate - Garagemactions:
- type: device.command.
volumeLevel: 80
devices: Gmini - Room- type: assistant.command.Broadcast
message: The garage door is open too long. Check if you have any problems.
devices: Gmini - Room
07-30-2023 12:22 PM
My first script did not run...
metadata:
name: Garage Door Open Detector
description: When the garage door is opened, announce it on all speakers.
automations:
# “starters” and “actions” are required; “conditions” are optional.
# Use Ctrl + Space to see autocomplete suggestions.
# ---- STARTERS ---- #
# Starters describe events that will start the automation.
# To add more than one starter, duplicate the "- type" section under "starters".
# If you add multiple starter events, any one of them happening will start the automation.
starters:
- type: device.state.OpenClose
state: openPercent
# [available operators: is, isNot, lessThan, lessThanOrEqualTo, greaterThan, greaterThanOrEqualTo]
greaterThan: 10
device: Garage Door - Garage
# ---- CONDITIONS ---- #
# Conditions are optional. Delete this section if it’s empty.
# Conditions will prevent an automation from starting if the conditions aren’t met.
# See g.co/home/script-editor-docs for documentation about how to use logical operators like “and”, “or”, and “not”.
# ---- ACTIONS ---- #
# Actions will start when a starter event takes place and all conditions are met.
# Actions will start in the order they appear in the script and with any delay specified.
# To add more than one action, duplicate the "- type" section under "actions".
actions:
- type: assistant.command.Broadcast
message: The garage door has been opened.
devices:
- Bathroom Speaker - Bathroom
- Living Room Display - Living Room
- Master Bedroom Display - Master Bedroom
08-18-2023 12:24 PM
#
08-20-2023 08:26 AM
???
08-18-2023 06:53 PM - edited 08-20-2023 07:02 PM
Looking for some help as to what would cause this script, which does validate with no errors, to not run unless I run it manually.
The intent is to set the temperature to 76 degrees F when the temperature drops below 76 and the mode is set to cool. So for the scenario where there is no schedule set and the thermostat is not locked out, and someone manually sets the thermometer to a temperature too low (which would cost high electric bills), the thermostat would reset itself back to the target temperature of 76 degrees.
# ------------------------------------------------------------------------------------------ #
# Lines starting with “#” are comments and will be ignored by the automation.
# Indentation determines hierarchy within the script.
# Visit g.co/home/script-editor-docs for full documentation.
# ------------------------------------------------------------------------------------------ #
metadata:
name: Dining Room 2 Temp Less XX
description: If Cooling drops below XX set it to YY
automations:
# “starters” and “actions” are required; “condition” is optional.
# Use Ctrl + Space to see autocomplete suggestions.
# ---- STARTERS ---- #
starters:
- type: device.state.TemperatureSetting # Handles temperature points and modes of a thermostat device.
state: thermostatTemperatureAmbient
lessThan: 76F
device: Dining Room(Dining Room 2) - Dining Room
# ---- CONDITIONS ---- #
condition:
type: device.state.TemperatureSetting # Handles temperature points and modes of a thermostat device.
state: activeThermostatMode
is: cool
device: Dining Room(Dining Room 2) - Dining Room
# ---- ACTIONS ---- #
actions:
- type: device.command.ThermostatTemperatureSetpoint # Set the target temperature for a thermostat device.
thermostatTemperatureSetpoint: 76F
devices: Dining Room(Dining Room 2) - Dining Room
08-20-2023 06:00 AM
I'm confused. Isn't this exactly what setting the thermostat to cool does by itself? Even my dumb thermostat before getting a nest would cool when the temp dropped below the set temperature.
08-20-2023 08:25 AM
Your question does not account for someone manually changing the thermostat. 😉
The intent is that if someone walks up to the thermostat to set it to 65 degrees in cool mode that the routine will set it back to 76 degrees at some point without relying on a schedule, preset ranges or locking out the thermostat.
08-22-2023 05:51 PM
Using This, But want to Add, that the lights only will run for 5 Mins
metadata:
name: Lights On At Arrival
description: After dark, when someone arrives home, turn on lights, and turn off all lights when the home is unoccupied.
automations:
# Turn on certain lights after someone gets home after dark
- starters:
- type: home.state.HomePresence
state: homePresenceMode
is: HOME
condition:
type: time.between
after: SUNSET
before: SUNRISE
actions:
- type: device.command.OnOff
devices:
- Garage Lights - Garage
- Kasa Smart Bulb - Outside
on: true
# Turn off all lights when everyone is away during the day
- starters:
- type: home.state.HomePresence
state: homePresenceMode
is: AWAY
condition:
type: time.between
after: SUNRISE
before: SUNSET
actions:
- type: device.command.OnOff
devices:
- Garage Lights - Garage
- Kasa Smart Bulb - Outside
on: false
08-23-2023 11:16 PM
It would be nice to be able to adjust the brightness and color of my lights without changing the on/off state. I know this is a supported payload with Hue bulbs, and I feel the use case is common when dealing with multiple light-related scripts.
In my use case, I want to be able to turn off the lights in a room while watching movies after sunset and then turn them back on once I am done. But, I will be gradually dimming my lights between sunset and midnight. Without this feature, I now have the added hassle of having to manually turn off my lights mid-viewing because my viewing and time schedules may overlap.
08-25-2023 08:21 PM
Any plans to allow a certain apps notifications to be used as triggers? I am trying to see if I can automate my Nest Home Hub in the Kitchen to play the Islamic call to prayer during the variables 5 times over the course of the year. I have an app on my phone that notifies me of the times as they change each day. But I am wondering how I could use the prayer time (which changes each day based on length of day, sun position and certain other conditions) as a starter to trigger a video of the call to prayer to play on youtube.
08-28-2023 12:51 PM
Hi everyone, I didn't find a confirmation yet, so could you please tell me:
if I create a script with two starters, the second will be trigger only if the first starter has already been triggered or it is independent?
08-28-2023 12:56 PM
no, it's "OR" logic there
08-28-2023 12:57 PM
is it possible to change it in "AND"?
08-28-2023 01:01 PM
that's what "condition" for. you can apply and/or logic in the conditions after at least one of the starters triggered
08-28-2023 01:08 PM
my purpose is to turn a light on when there is motion in the room.
only when the light is turned on by the first starter, if there is no motion for 10min I want that it should turn the light off.
I have the eve motion sensor and the "device.state.OccupancySensing" type is not supported
08-29-2023 12:54 AM
How will the script editor integrate with local processing as promised by Matter? Will scripts be synchronised with local Google controllers such that scripts will not require the cloud to operate?
08-30-2023 07:31 AM
A recent blog post states we can enable starter suppression, but it doesn't explain how. Can someone point me towards how to enable/use/turn this on?
08-30-2023 08:07 AM
This project needs some readable documentation. The current documentation is based on explaining an object when you ask about the object. There is little generic documentation to bring new users up to speed with how things work in general.
08-30-2023 08:37 AM
Please see this example: https://developers.home.google.com/automations/example-scripts#when_i_walk_through_my_corridor_first...
suppressFor field in the starter enables this.
We will work on improving the documentation discovery for this feature.
09-05-2023 06:03 AM
I currently have the problem that "members" does not work in the notifications. As soon as I type in members, the two household members are suggested with their names and email addresses. However, as soon as I want to shoot down the automation, I am told that this is not a member of the household. How can I solve the problem?
I also connected an Aqara M2 Hub with multiple contact sensors to Google Home via Matter. Unfortunately, the alarm or security system can only be controlled via Aqara. Does anyone have an idea how to sharpen the "fake" alarm. So due to this, Automation will receive a notification and the Nest audio will play a sound when a window has been opened. This is basically possible, but of course only if I have started an automation for it. I didn't want to rely on the presence and absence detection, but rather switch it on and off manually. i.e. an automation that creates a notification and the Nest audio emits a sound when a window is opened. This is basically possible, but of course only if I have started an automation for it. I didn't want to rely on the presence and absence detection, but rather switch it on and off manually.
09-05-2023 12:01 PM
Hi!
I am trying to combine the state of my TV (switching it on) and the sunset to turn on some lights in the living room.
The lights should be switched on when I turn on the TV AND it is after sunset.
metadata:
name: Auto Living room lights
description: Turn on lights when I'm starting the TV after sunset
automations:
- starters:
- type: device.state.OnOff
state: on
# [available operators: is, isNot]
is: true
device: P TV - Living Room
condition:
type: time.between
after: sunset
weekdays:
- MON
- TUE
- WED
- THU
- FRI
- SAT
- SUN
actions:
- type: device.command.OnOff
on: true
devices: Living Room Lights - Living Room
It's actually quite a simple script, however it is not firing. Maybe the starter is incorrect. Any suggestions?
Btw, the second part of the script would be to turn on the lights at sunset if the TV is running.
09-05-2023 12:05 PM
You're missing the before sunrise part of the condition, but I've been trying the same thing with intermittent success. I've tried using my TV and my Roku as the starter and online or turned on as the conditions. It's worked before, in fact my lights have been on in the morning when online was the starter, but it doesn't trigger consistently. I think the issue is that Google isn't continually monitoring the activity of the TV or the Roku unless it's triggered through the assistant (eg using the assistant or another routine to turn on the TV)
09-05-2023 12:49 PM
Thanks for your reply.
The before attribute is optional, so I thought I could skip it. I put it in upon your advice but it's still not working.
I have the same impression as you, it appears to be a monitoring issue. Or maybe the TV isn't telling the home "Hey, I'm on now. Do what you have to do."
09-05-2023 02:32 PM
script making not creativity creativity making only one script
09-05-2023 02:39 PM
09-05-2023 02:29 PM
one searching one answer created not creativity creativity making only one creator for searching history
09-05-2023 02:38 PM
pivacy want for privet searching place human privacy important good searching place
09-09-2023 05:07 AM
I thought that it’s gonna be possible to initiate a Starter
condition
action
Condition
action
i want to do that because I want a broadcast alert if I left the door open for more than 5 min
but it don’t want to
09-09-2023 05:44 AM
Or if we can add a time.delay in condition it will fix the problem