forked from SamZorSec/Open-Home-Automation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathautomation_3a.yaml
152 lines (152 loc) · 3.72 KB
/
automation_3a.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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
alias: 'Switch on the lamp 5 progressively (3a)'
trigger:
platform: template
value_template: '{{ now.time().strftime("%-H") == states.sensor.alarm_clock_hour.state and now.time().strftime("%-M") == states.sensor.alarm_clock_minute.state }}'
condition:
condition: and
conditions:
- condition: state
entity_id: input_boolean.alarm_clock_status
state: 'on'
- condition: time
weekday:
- mon
- tue
- wed
- thu
- fri
action:
# minute 0 to 1
- service: light.turn_on
data:
entity_id: light.lamp_5
brightness: 45
rgb_color: [255, 0, 0] # red
- delay:
minutes: 1
# minute 1 to 2
- service: light.turn_on
data:
entity_id: light.lamp_5
brightness: 60
rgb_color: [255, 51, 51]
- delay:
minutes: 1
# minute 2 to 3
- service: light.turn_on
data:
entity_id: light.lamp_5
brightness: 75
rgb_color: [255, 102, 102]
- delay:
minutes: 1
# minute 3 to 4
- service: light.turn_on
data:
entity_id: light.lamp_5
brightness: 90
rgb_color: [255, 128, 0]
- delay:
minutes: 1
# minute 4 to 5
- service: light.turn_on
data:
entity_id: light.lamp_5
brightness: 105
rgb_color: [255, 153, 51]
- delay:
minutes: 1
# minute 5 to 6
- service: light.turn_on
data:
entity_id: light.lamp_5
brightness: 120
rgb_color: [255, 178, 102]
- delay:
minutes: 1
# minute 6 to 7
- service: light.turn_on
data:
entity_id: light.lamp_5
brightness: 135
rgb_color: [255, 204, 153]
- delay:
minutes: 1
# minute 7 to 8
- service: light.turn_on
data:
entity_id: light.lamp_5
brightness: 150
rgb_color: [255, 229, 204]
- delay:
minutes: 1
# minute 8 to 9
- service: light.turn_on
data:
entity_id: light.lamp_5
brightness: 165
rgb_color: [255, 255, 204]
- delay:
minutes: 1
# minute 9 to 10
- service: light.turn_on
data:
entity_id: light.lamp_5
brightness: 180
rgb_color: [255, 255, 153]
- delay:
minutes: 1
# minute 10 to 11
- service: light.turn_on
data:
entity_id: light.lamp_5
brightness: 195
rgb_color: [255, 255, 102]
- delay:
minutes: 1
# minute 11 to 12
- service: light.turn_on
data:
entity_id: light.lamp_5
brightness: 210
rgb_color: [255, 255, 51]
- delay:
minutes: 1
# minute 12 to 13
- service: light.turn_on
data:
entity_id: light.lamp_5
brightness: 225
rgb_color: [255, 255, 0]
- delay:
minutes: 1
# minute 13 to 14
- service: light.turn_on
data:
entity_id: light.lamp_5
brightness: 240
rgb_color: [255, 255, 255]
- delay:
minutes: 1
# minute 14 to 15
- service: light.turn_on
data:
entity_id: light.lamp_5
brightness: 255
rgb_color: [255, 255, 255]
- delay:
minutes: 1
- service: light.turn_on
entity_id: light.lamp_6
- service: light.turn_off
entity_id: light.lamp_5
# https://home-assistant.io/cookbook/notify_if_over_threshold/
- service: notify.notify
data_template:
message: >
Hi Sam ! It's time to wake up ! It's {{ states.sensor.forecastio_temperature.state | round(0) }} degrees Celcius outside and the maximum temperature will be {{ states.sensor.forecastio_daily_high_temperature.state | round(0) }}. There's a {{ states.sensor.forecastio_precip_probability.state | round(0) }}% chance of rain today.
{% if states('sensor.forecastio_precip_probability') | int > 50 %}
Don't forget to bring your favorite umbrella! Have a nice (and rainy) day !
{% else %}
Have a nice day!
{% endif %}