-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscripts.yaml
More file actions
160 lines (154 loc) · 5.03 KB
/
scripts.yaml
File metadata and controls
160 lines (154 loc) · 5.03 KB
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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
devices_off:
alias: "Devices Auto Off"
sequence:
- service: media_player.turn_off
data:
entity_id: media_player.pandora
- service: media_player.turn_off
data:
entity_id: media_player.living_room_tv
- service: media_player.turn_off
data:
entity_id: media_player.bed_room
- service: media_player.turn_off
data:
entity_id: media_player.mpd
- service: media_player.turn_off
data:
entity_id: media_player.roku2_brayden
- service: climate.set_temperature
data_template:
entity_id: climate.thermostat_heating_1
temperature: '{{ float(states.input_number.tempature_night.state) }}'
good_night:
alias: "Good Night"
sequence:
- service: light.turn_off
entity_id: group.house_lights
- service: climate.set_temperature
data_template:
entity_id: climate.thermostat_heating_1
temperature: '{{ float(states.input_number.tempature_night.state) }}'
home_away:
alias: "Away Mode"
sequence:
- service: scene.turn_on
entity_id: scene.away_lights
- service: media_player.turn_off
data:
entity_id: media_player.mpd
- service: media_player.turn_off
data:
entity_id: media_player.living_room_tv
- service: media_player.turn_off
data:
entity_id: media_player.roku2__brayden
- service: climate.set_temperature
data_template:
entity_id: climate.thermostat_heating_1
temperature: '{{ float(states.input_number.tempature_away.state) }}'
- service: notify.homepird3scom_html5_robert_phone
data:
message: 'Home Away Mode on at {{now().strftime("%H:%M:%S")}}'
home_occupied:
alias: "Occupied Mode"
sequence:
- service: climate.set_temperature
data_template:
entity_id: climate.thermostat_heating_1
temperature: '{{ float(states.input_number.tempature_home.state) }}'
- service: notify.homepird3scom_html5_robert_phone
data:
message: 'Home Away Mode off at {{now().strftime("%H:%M:%S")}}'
kitchen_lights:
alias: "Turn off kitchen lights after 30 minutes"
sequence:
- service: light.turn_on
data_template:
entity_id: light.kitchen_table_light_level
brightness: "{{ states.sensor.time_brightness.state|int }}"
- delay: '00:30:00'
- service: light.turn_off
data:
entity_id: light.kitchen_table_light_level
quiet_off:
alias: "Quiet Time Off"
sequence:
- service: zwave.set_config_parameter
data_template: {
"node_id": "{{ states.zwave.kids_room1.attributes.node_id }}",
"parameter": 3,
"value": 'Occupancy'
}
- service: zwave.set_config_parameter
data_template: {
"node_id": "{{ states.zwave.half_bathroom.attributes.node_id }}",
"parameter": 3,
"value": 'Occupancy'
}
- service: zwave.set_config_parameter
data_template: {
"node_id": "{{ states.zwave.front_door_light.attributes.node_id }}",
"parameter": 3,
"value": 'Occupancy'
}
quiet_on:
alias: "Quiet Time On"
sequence:
# Brayden's Room 20 - Disable montion light
- service: zwave.set_config_parameter
data_template: {
"node_id": "{{ states.zwave.kids_room1.attributes.node_id }}",
"parameter": 3,
"value": 'Vacancy'
}
# half bathroom 12
- service: zwave.set_config_parameter
data_template: {
"node_id": "{{ states.zwave.half_bathroom.attributes.node_id }}",
"parameter": 3,
"value": 'Vacancy'
}
# front door hall light 18
- service: zwave.set_config_parameter
data_template: {
"node_id": "{{ states.zwave.front_door_light.attributes.node_id }}",
"parameter": 3,
"value": 'Vacancy'
}
refresh_devices:
sequence:
- service: mqtt.publish
data:
topic: "owntracks/robert/phone/cmd"
payload_template: '{"_type":"cmd","action":"reportLocation"}'
wake_up:
sequence:
- service: climate.set_temperature
data_template:
entity_id: climate.thermostat_heating_1
temperature: '{{ float(states.input_number.tempature_home.state) }}'
- service: light.turn_on
data_template:
entity_id: light.stairs_light_level
- delay: '00:00:04'
- service: light.turn_on
data_template:
entity_id: light.stairs_light_level
brightness: '{{ states.sensor.time_brightness.state|int }}'
- service: notify.homepird3scom_html5_robert_phone
data:
message: "Good morning! Today: {{ states('sensor.pws_weather_1d') }}, tempatures ranging {{ states('sensor.pws_temp_low_1d_f') }} - {{ states('sensor.pws_temp_high_1d_f') }}°f Now: {{ states('sensor.pws_temp_f') }}°f"
light_flash:
alias: Light flash on
sequence:
- service: homeassistant.turn_on
data:
entity_id: light.stairs_light_level
- delay: '00:00:01'
- service: homeassistant.turn_off
data:
entity_id: light.stairs_light_level
- service: script.turn_on
data:
entity_id: script.light_flash