Created
November 29, 2023 08:56
-
-
Save mjyc/ad2de6e348f8be86e335be53cfb38fe4 to your computer and use it in GitHub Desktop.
Google Home Automation Script Examples
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
metadata: | |
name: Office room lights - day | |
description: Scripted automation | |
automations: | |
starters: | |
- type: time.schedule | |
at: 10:00:00 AM | |
- type: time.schedule | |
at: 11:00:00 AM | |
- type: time.schedule | |
at: 12:00:00 PM | |
- type: time.schedule | |
at: 1:00:00 PM | |
- type: time.schedule | |
at: 2:00:00 PM | |
- type: time.schedule | |
at: 3:00:00 PM | |
- type: time.schedule | |
at: 4:00:00 PM | |
- type: time.schedule | |
at: 5:00:00 PM | |
- type: time.schedule | |
at: 6:00:00 PM | |
- type: time.schedule | |
at: 7:00:00 PM | |
- type: device.state.OnOff | |
state: on | |
is: true | |
device: Bulb 1 - Office | |
- type: device.state.OnOff | |
state: on | |
is: true | |
device: Bulb 2 - Office | |
condition: | |
type: time.between | |
after: 10:00:00 AM | |
before: 8:00:00 PM | |
actions: | |
- type: device.command.BrightnessAbsolute | |
brightness: 100 | |
devices: | |
[ | |
Bulb 1 - Office, | |
Bulb 2 - Office, | |
] | |
- type: device.command.ColorAbsolute | |
color: | |
temperature: 5000K | |
devices: | |
[ | |
Bulb 1 - Office, | |
Bulb 2 - Office, | |
] | |
--- | |
metadata: | |
name: Office room lights - evening/morning | |
description: Scripted automation | |
automations: | |
starters: | |
- type: time.schedule | |
at: 8:00:00 PM | |
- type: time.schedule | |
at: 9:00:00 PM | |
- type: time.schedule | |
at: 10:00:00 PM | |
- type: time.schedule | |
at: 11:00:00 PM | |
- type: time.schedule | |
at: 7:00:00 AM | |
- type: time.schedule | |
at: 8:00:00 AM | |
- type: time.schedule | |
at: 9:00:00 AM | |
- type: device.state.OnOff | |
state: on | |
is: true | |
device: Bulb 1 - Office | |
- type: device.state.OnOff | |
state: on | |
is: true | |
device: Bulb 2 - Office | |
condition: | |
type: or | |
conditions: | |
- type: time.between | |
after: 8:00:00 PM | |
before: 11:00:00 PM | |
- type: time.between | |
after: 7:00:00 AM | |
before: 10:00:00 AM | |
actions: | |
- type: device.command.BrightnessAbsolute | |
brightness: 70 | |
Bulb 1: [Bulb 1 - Office, Bulb 2 - Office] | |
- type: device.command.ColorAbsolute | |
color: | |
temperature: 3000K | |
Bulb 1: [Bulb 1 - Office, Bulb 2 - Office] | |
--- | |
metadata: | |
name: Office room lights - sleep | |
description: Scripted automation | |
automations: | |
starters: | |
- type: time.schedule | |
at: 11:00:00 PM | |
- type: time.schedule | |
at: 12:00:00 AM | |
- type: time.schedule | |
at: 1:00:00 AM | |
- type: time.schedule | |
at: 5:00:00 AM | |
- type: time.schedule | |
at: 6:00:00 AM | |
- type: device.state.OnOff | |
state: on | |
is: true | |
device: Bulb 1 - Office | |
- type: device.state.OnOff | |
state: on | |
is: true | |
device: Bulb 2 - Office | |
condition: | |
type: time.between | |
after: 11:00:00 PM | |
before: 7:00:00 AM | |
actions: | |
- type: device.command.BrightnessAbsolute | |
brightness: 10 | |
devices: | |
[ | |
Bulb 1 - Office, | |
Bulb 2 - Office, | |
] | |
- type: device.command.ColorAbsolute | |
color: | |
temperature: 1000K | |
devices: | |
[ | |
Bulb 1 - Office, | |
Bulb 2 - Office, | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment