-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplotly-5-sensors.yaml
306 lines (301 loc) · 8.31 KB
/
plotly-5-sensors.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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
type: custom:plotly-graph
title: null
time_offset: 3h
autorange_after_scroll: true
config:
displaylogo: false
scrollZoom: true
displayModeBar: true
entities:
- entity: sensor.temperatura_tado
legendgroup: 1
showlegend: true
hovertemplate: >-
<span style="text-align: center; font-size: 20px;">%{y:.0f}
ºC</span><br>%{x}<extra></extra>
name: C
mode: lines
yaxis: y1
line:
width: 2
color: rgba ( 0, 221, 51 , 0.8)
- entity: sensor.netatmo_casa_de_sh_interior_exterior_temperature
showlegend: true
mode: lines
hovertemplate: >-
<span style="text-align: center; font-size: 20px;">%{y:.1f}
ºC</span><br>%{x}<extra></extra>
texttemplate: ' %{y:.1f}'
yaxis: y2
marker:
color: rgba(165,165,0,0.9)
name: 'N'
line:
shape: spline
width: 3
color: ' #ffab3b '
- entity: sensor.switchbot_meter_bt_temperatura
showlegend: true
hovertemplate: >-
<span style="text-align: center; font-size: 20px;">%{y:.1f}
ºC</span><br>%{x}<extra></extra>
yaxis: y3
textposition: bottom left
texttemplate: ' %{y:.1f}'
name: SB
line:
width: 2
shape: spline
color: rgba ( 249, 37, 8, 0.8)
- entity: sensor.netatmo_casa_de_sh_interior_temperature
showlegend: true
hovertemplate: >-
<span style="text-align: center; font-size: 20px;">%{y:.1f}
ºC</span><br>%{x}<extra></extra>
yaxis: y4
name: 'N'
texttemplate: ' %{y:.1f}'
line:
shape: spline
width: 3
color: rgba ( 0, 201, 255 , 0.9)
- entity: sensor.aire_acondicionado_temperature
showlegend: true
hovertemplate: >-
<span style="text-align: center; font-size: 20px;">%{y:.1f}
ºC</span><br>%{x}<extra></extra>
yaxis: y5
name: Tado
texttemplate: ' %{y:.1f}'
line:
shape: spline
width: 1.5
color: rgba ( 0, 111, 255 , 0.9)
- entity: ''
hovertemplate: '<span style="display: none;"> <extra></extra> '
name: Now
yaxis: y9
texttemplate: ' Now'
showlegend: false
show_value: true
line:
width: 2
color: rgba ( 239, 8, 249 , 1 )
x: $ex [Date.now(), Date.now()]
'y':
- 0
- 1
defaults:
entity:
show_value: false
yaxes:
fixedrange: true
fn: |
$fn({getFromConfig, vars})=> {
const range = getFromConfig("visible_range");
const width = range[1] - range[0];
vars.scroll = (label, p) => ({
args: [
{
layout: {
"xaxis.range": [range[0] + width*p, range[1] + width*p],
}
}, {
transition: {
duration: 150,
}
}
],
label,
method: "animate",
})
vars.zoom = (label, h) => ({
args: [
{
layout: {
"xaxis.range": [Date.now()-1000*60*60*h, Date.now()],
}
}
],
label,
method: "animate",
})
}
layout:
modebar:
orientation: v
marker:
size: 20
xaxis:
tickangle: 0
minor:
nticks: 3
tickmode: auto
showgrid: false
tickformat: auto
gridcolor: ' #454545 '
yaxis:
side: left
ticksuffix: null
showticklabels: true
tickangle: 0
minor:
nticks: 4
tickmode: auto
showgrid: true
gridcolor: ' #454545 '
tickformat: auto
range:
- 15
- 35
annotations:
- text: |-
$fn ({hass}) =>
"<span style='font-size: 18px;'><span style='font-weight: bold; color: rgba( 0, 221, 51 , 1)'>"
+ hass.states['sensor.temperatura_tado'].state + "</span></span>º<br>"
+ "</span><span style='font-weight: bold; font-size: 16px;color: rgba( 0, 221, 51 , 1)'>Tado</span><br>"
+ (hass.states['sensor.aire_acondicionado_temperature'] ? "<br><span style='font-size: 30px;color: rgba( 47, 255, 241 , 1)'>❄</span>":'')
xref: x domain
yref: y1 domain
xanchor: center
yanchor: top
x: 1.08
'y': 0.9
showarrow: false
- text: |-
$fn ({hass}) =>
"<span style='font-size: 18px;'><span style='font-weight: bold; color: rgba( 255, 187, 47 , 1)'>"
+ hass.states['sensor.netatmo_casa_de_sh_interior_exterior_temperature'].state + "</span></span>º<br>"
+ "</span><span style='font-weight: bold; color: rgba( 255, 187, 47 , 1)'>NET🌡</span><br>"
+ (hass.states['sensor.aire_acondicionado_temperature'] ? "<br><span style='font-size: 30px;color: rgba( 0, 221, 51 , 1)'></span>":'')
xref: x domain
yref: y1 domain
xanchor: center
yanchor: top
x: 1.08
'y': 0.6
showarrow: false
- text: |-
$fn ({hass}) =>
"<span style='font-size: 18px;'><span style='font-weight: bold; color: rgba( 249, 37, 8 , 1)'>"
+ hass.states['sensor.switchbot_meter_bt_temperatura'].state + "</span></span>º<br>"
+ "</span><span style='font-weight: bold; color: rgba( 249, 37, 8 , 1)'>SB🌡</span><br>"
+ (hass.states['sensor.aire_acondicionado_temperature'] ? "<br><span style='font-size: 30px;color: rgba( 0, 221, 51 , 1)'></span>":'')
xref: x domain
yref: y1 domain
xanchor: center
yanchor: top
x: 1.08
'y': 0.45
showarrow: false
- text: |-
$fn ({hass}) =>
"<span style='font-size: 18px;'><span style='font-weight: bold; color: rgba( 0, 201, 255 , 1)'>"
+ hass.states['sensor.netatmo_casa_de_sh_interior_temperature'].state + "</span></span>º<br>"
+ "</span><span style='font-weight: bold; color: rgba( 0, 201, 255 , 1)'>NET🌡</span><br>"
+ (hass.states['sensor.aire_acondicionado_temperature'] ? "<br><span style='font-size: 30px;color: rgba( 0, 221, 51 , 1)'></span>":'')
xref: x domain
yref: y1 domain
xanchor: center
yanchor: top
x: 1.08
'y': 0.3
showarrow: false
- text: |-
$fn ({hass}) =>
"<span style='font-size: 18px;'><span style='font-weight: bold; color: rgba( 0, 111, 255 , 1)'>"
+ hass.states['sensor.tado_temperature_1_decimal'].state + "</span></span>º<br>"
+ "</span><span style='font-weight: bold; color: rgba( 0, 111, 255 , 1)'>Tado🌡</span><br>"
+ (hass.states['sensor.aire_acondicionado_temperature'] ? "<br><span style='font-size: 30px;color: rgba( 0, 221, 51 , 1)'></span>":'')
xref: x domain
yref: y1 domain
xanchor: center
yanchor: top
x: 1.08
'y': 0.15
showarrow: false
yaxis2:
side: left
showticklabels: false
title: ''
tickangle: 0
minor:
nticks: 3
tickmode: auto
showgrid: true
gridcolor: ' #454545 '
tickformat: auto
yaxis3:
side: left
showticklabels: false
tickangle: 0
minor:
nticks: 3
tickmode: auto
showgrid: true
gridcolor: ' #454545 '
tickformat: auto
yaxis4:
side: left
showticklabels: false
tickangle: 0
minor:
nticks: 3
tickmode: auto
showgrid: true
gridcolor: ' #454545 '
tickformat: auto
yaxis5:
side: left
showticklabels: false
tickangle: 0
minor:
nticks: 3
tickmode: auto
showgrid: true
gridcolor: ' #454545 '
tickformat: auto
height: 500
margin:
l: 40
r: 60
t: 100
updatemenus:
- buttons:
- $fn({vars}) => vars.scroll( '<', -.5)
- $fn({vars}) => vars.scroll( '>', .5)
direction: right
active: -1
pad:
r: 10
t: -90
type: buttons
x: 1
xanchor: right
'y': 1
yanchor: top
- buttons:
- $fn({vars}) => vars.zoom( '2w', 24*14)
- $fn({vars}) => vars.zoom( '2d', 24*2)
- $fn({vars}) => vars.zoom( '12h', 12)
- $fn({vars}) => vars.zoom( '3h', 3)
- $fn({vars}) => vars.zoom( '1h', 1)
direction: right
active: -1
pad:
l: -15
t: -90
type: buttons
x: 0
xanchor: left
'y': 1
yanchor: top
font:
family: Roboto,Noto,sans-serif
size: 14
color: $fn ({css_vars}) => css_vars['primary-text-color']
paper_bgcolor: rgba(0, 0, 0, 0.4)
plot_bgcolor: rgba(0, 0, 0, 0)
legend:
itemwidth: 1
hours_to_show: 30