-
Notifications
You must be signed in to change notification settings - Fork 0
/
scripts.yaml
133 lines (126 loc) · 4.28 KB
/
scripts.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
thermostat_home_18:
alias: "Thermostat Home 18"
sequence:
- alias: Set thermostat Home
service: nest.set_mode
data:
home_mode: home
- alias: Set temperature to 18
service: climate.set_temperature
data:
entity_id: climate.hallway
temperature: 18
thermostat_home_22:
alias: "Thermostat Home 22"
sequence:
- alias: Set thermostat Home
service: nest.set_mode
data:
home_mode: home
- alias: Set temperature to 22
service: climate.set_temperature
data:
entity_id: climate.hallway
temperature: 21.5
thermostat_away:
sequence:
- service: nest.set_mode
data:
home_mode: away
leaving_home:
alias: "Leaving Home"
sequence:
- alias: Lock front door
service: lock.lock
data:
entity_id: lock.front_door_locked_10
- alias: Lock back door
service: lock.lock
data:
entity_id: lock.back_door_locked_11
- alias: Turn off hallway light
service: light.turn_off
data:
entity_id: light.front_hallway
- alias: Alarm is on
service: input_boolean.turn_on
data:
entity_id: input_boolean.alarm_state
- alias: send notification
service: notify.mypushover
data:
title: "No one is home anymore."
message: "The last family member has left the house."
arriving_home:
alias: "Arriving Home"
sequence:
- alias: Unlock front door
service: lock.unlock
data:
entity_id: lock.front_door_locked_10
- alias: Turn on hallway light
service: light.turn_on
data:
entity_id: light.front_hallway
- alias: Turn on outdoor lights
service: light.turn_on
data:
entity_id: light.outdoor_lights
- alias: Alarm is off
service: input_boolean.turn_off
data:
entity_id: input_boolean.alarm_state
arriving_home_late:
alias: "Arriving Home Late"
sequence:
- alias: Alarm is off
service: input_boolean.turn_off
data:
entity_id: input_boolean.alarm_state
greeting:
alias: Greeting
sequence:
- service: media_player.volume_set
data:
entity_id: media_player.kitchen_home
volume_level: 0.50
- service: tts.google_say
entity_id: media_player.kitchen_home
data_template:
message: >
Hello Hello Hello.
{% if now().strftime("%H")|int > 9 and now().strftime("%H")|int < 11 %}
Good morning. It's {{now().strftime("%I")}}:{{now().strftime("%M")}} {{now().strftime("%p")}}
{% elif now().strftime("%H")|int > 21 and now().strftime("%H")|int < 23 %}
Good evening. It's {{now().strftime("%I")}}:{{now().strftime("%M")}} {{now().strftime("%p")}}
{% elif now().strftime("%H")|int < 12 %}
Good morning. It's {{now().strftime("%I")|replace("0", "")}}:{{now().strftime("%M")}} {{now().strftime("%p")}}
{% elif now().strftime("%H")|int < 18 %}
Good afternoon. It's {{now().strftime("%I")|replace("0", "")}}:{{now().strftime("%M")}} {{now().strftime("%p")}}
{% else %}
Good evening. It's {{now().strftime("%I")|replace("0", "")}}:{{now().strftime("%M")}} {{now().strftime("%p")}}
{% endif %}
the weather in Edmonton is {{states.sensor.dark_sky_temperature.state|round}} degrees and {{states.sensor.dark_sky_summary.state}}. Today will be {{states.sensor.dark_sky_hourly_summary.state|replace(".", "")}}, with a high of {{states.sensor.dark_sky_daily_high_temperature.state|round}} degrees.
{% if is_state('sensor.garage_door_status', 'Open') %}
Heads up: The garage door has been left open
{% endif %}
- service: media_player.volume_set
data:
entity_id: media_player.kitchen_home
volume_level: 0.15
garage_door_warning:
alias: Garage Door Warning
sequence:
- service: media_player.volume_set
data:
entity_id: media_player.kitchen_home
volume_level: 0.50
- service: tts.google_say
entity_id: media_player.kitchen_home
data_template:
message: >
Hello Hello Hello. Heads up: The garage door has been left open
- service: media_player.volume_set
data:
entity_id: media_player.kitchen_home
volume_level: 0.15