generated from Dennis-Rosenbaum/MMM-Template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMMM-AirQuality.njk
142 lines (138 loc) · 4.57 KB
/
MMM-AirQuality.njk
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
{#
MagicMirror²
Module: MMM-AirQuality
By Ira theobold https://github.com/bluerhodfa
MIT Licensed.
#}
<div class="small light">
{% if message %}
{{ message|safe }}
{% elif loaded %}
<div class="medium" style="color: {{ colour }}"><i class="fa-solid fa-smog"></i> {{ impact }}{% if showIndex %} ({{ index }}){% endif %}</div>
{% if showLocation %}
<div class="small">{{ city }}</div>
{% endif %}
{% if showPollutants %}
<br>
<div>
<table class="small">
<thead>
<tr style="opacity: 1;">
Pollutant concentration in μg/m
<sup>3</sup>
</tr>
</thead>
<tbody>
<tr style="opacity: 1;">
<td class="align-left">
SO
<sub>2</sub>
</td>
<td class="align-left bright">
Sulphur Dioxide
</td>
<td class="align-right bright">
{{ so2 }}
</td>
</tr>
<tr style="opacity: 1;">
<td class="align-left">
NO
<sub>2</sub>
</td>
<td class="align-left bright">
Nitrogen Dioxide
</td>
<td class="align-right bright">
{{ no2 }}
</td>
</tr>
<tr style="opacity: 1;">
<td class="align-left">
PM
<sub>10</sub>
</td>
<td class="align-left bright">
Particulates under 10μm
</td>
<td class="align-right bright">
{{ pm10 }}
</td>
</tr>
<tr style="opacity: 1;">
<td class="align-left">
PM
<sub>2.5</sub>
</td>
<td class="align-left bright">
Particulates under 2.5μm
</td>
<td class="align-right bright">
{{ pm2_5 }}
</td>
</tr>
<tr style="opacity: 1;">
<td class="align-left">
O
<sub>3</sub>
</td>
<td class="align-left bright">
Ozone
</td>
<td class="align-right bright">
{{ o3 }}
</td>
</tr>
<tr style="opacity: 1;">
<td class="align-left">
CO
</td>
<td class="align-left bright">
Carbon Monoxide
</td>
<td class="align-right bright">
{{ co }}
</td>
</tr>
</tbody>
</table>
<table class="small">
<thead>
<tr style="opacity 1;">
Other pollutants that do not affect the AQI calculation:
</tr>
</thead>
<tbody>
<tr style="opacity: 1;">
<td class="align-left">
NH
<sub>3</sub>
</td>
<td class="align-left bright">
Ammonia
</td>
<td class="aligh-right bright">
{{ nh3 }}
</td>
</tr>
<tr style="opacity: 1;">
<td class="align-left">
NO
</td>
<td class="align-left bright">
Nitrogen monoxide
</td>
<td class="aligh-right bright">
{{ no }}
</td>
</tr>
</tbody>
</table>
</div>
{% endif %}
{% else %}
<div class="dimmed light small">
{{ labelLoading|safe }}
</div>
{% endif %}
</div>