forked from chunkysteveo/OpenEPaperLink-HA-Weatherman
-
Notifications
You must be signed in to change notification settings - Fork 0
/
automation-1.54.yaml
194 lines (194 loc) · 5.57 KB
/
automation-1.54.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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
alias: Epaper - Weatherman - 1.54"
description: "Mini Weatherman showing current conditions and the next hour and day summary."
variables:
severe_weather:
- fog
- hail
- lightning
- lightning-rainy
- pouring
- snowy
- snowy-rainy
- windy
- windy-variant
- exceptional
severe_temp_low: 3
severe_wind_speed: 10
severe_precipitation_hour: 5
severe_precipitation_day: 10
mode: restart
trigger:
- platform: time_pattern
minutes: /30
condition:
- condition: time
after: "07:25:00"
before: "22:00:00"
action:
- service: open_epaper_link.drawcustom
data:
background: white
rotate: 0
payload:
- type: icon
value: >-
{{ state_attr('sensor.weatherman_data_tag','moon_phase') |
string }}
x: 85
"y": 1
size: 18
color: black
- type: text
value: >-
{{ state_attr('sensor.weatherman_data_tag','wm_temp_0') |
string }}{{
state_attr('sensor.weatherman_data_tag','temperature_unit')
}}
font: ../../media/GothamRnd-Bold.ttf
x: 125
"y": 50
size: 18
color: >-
{{'black' if state_attr('sensor.weatherman_data_tag','wm_temp_0') >
severe_temp_low else 'red' }}
anchor: mt
- type: icon
value: >-
weather-{{
state_attr('sensor.weatherman_data_tag','wm_cond_0') |
string }}
x: 108
"y": 16
size: 34
color: >-
{{'red' if
state_attr('sensor.weatherman_data_tag','wm_cond_0') in
severe_weather else 'black' }}
- type: text
value: >-
{{ state_attr('sensor.weatherman_data_tag','wm_temp_4') |
string }}
font: ../../media/GothamRnd-Bold.ttf
x: 122
"y": 114
size: 14
color: >-
{{'black' if
state_attr('sensor.weatherman_data_tag','wm_temp_4') >
severe_temp_low else 'red' }}
anchor: rt
- type: text
value: /
font: ../../media/GothamRnd-Bold.ttf
x: 125
"y": 115
size: 14
color: black
anchor: mt
- type: text
value: >-
{{ state_attr('sensor.weatherman_data_tag','wm_temp_4_low')
| string }}
font: ../../media/GothamRnd-Bold.ttf
x: 128
"y": 121
size: 14
color: >-
{{'black' if
state_attr('sensor.weatherman_data_tag','wm_temp_4_low') >
severe_temp_low else 'red' }}
anchor: lt
- type: icon
value: >-
weather-{{
state_attr('sensor.weatherman_data_tag','wm_cond_4') |
string }}
x: 108
"y": 81
size: 34
color: >-
{{'red' if
state_attr('sensor.weatherman_data_tag','wm_cond_4') in
severe_weather else 'black' }}
- type: text
value: >-
{{ state_attr('sensor.weatherman_data_tag','wm_time_0') |
string | upper }}
font: ../../media/GothamRnd-Bold.ttf
x: 125
"y": 5
size: 12
color: black
anchor: mt
- type: text
value: >-
{{ state_attr('sensor.weatherman_data_tag','wm_time_4') |
string | upper }}
font: ../../media/GothamRnd-Bold.ttf
x: 125
"y": 70
size: 12
color: black
anchor: mt
- type: line
fill: black
width: 1
x_start: 105
y_start: 67
x_end: 150
y_end: 67
- type: text
value: >-
{{ state_attr('sensor.weatherman_data_tag','wm_temp_now') |
round | int(0) }}{{
state_attr('sensor.weatherman_data_tag','temperature_unit')
}}
font: ../../media/GothamRnd-Bold.ttf
x: 52
"y": 94
size: 38
anchor: mt
color: >-
{{'black' if
state_attr('sensor.weatherman_data_tag','wm_temp_now') |
round > severe_temp_low else 'red' }}
- type: icon
value: >-
weather-{{
state_attr('sensor.weatherman_data_tag','wm_cond_now') |
string }}
x: 6
"y": 2
size: 92
color: >-
{{'red' if
state_attr('sensor.weatherman_data_tag','wm_cond_now') in
severe_weather else 'black' }}
- type: icon
value: >-
{{ "%s" %
(["arrow-down","arrow-bottom-left","arrow-left","arrow-top-left","arrow-up","arrow-top-right","arrow-right",
"arrow-bottom-right","arrow-down"][(state_attr('sensor.weatherman_data_tag','wm_wind_dir_now')/45)
| round ]) }}
x: 6
"y": 129
size: 20
color: black
- type: text
value: >-
{{ state_attr('sensor.weatherman_data_tag','wm_wind_speed_now') |
round }}{{
state_attr('sensor.weatherman_data_tag','wind_speed_unit')
}}
font: ../../media/GothamRnd-Bold.ttf
x: 26
"y": 130
size: 18
color: >-
{{'black' if
state_attr('sensor.weatherman_data_tag','wm_wind_speed_now') | int <
severe_wind_speed else 'red' }}
anchor: lt
target:
entity_id:
- open_epaper_link.000002A123456789