Projet

Général

Profil

Révision 35c403ed

ID35c403ed64660af3cf210828251ffea3621f7f51
Parent 520c436c
Enfant b44d8093

Ajouté par Olivier Mehani il y a environ 4 ans

[wunderground_] Allow to disable alerts with `env.alerts no`

Signed-off-by: Olivier Mehani <>

Voir les différences:

plugins/weather/wunderground_
26 26
	env.units metric		# optional, this is the default
27 27
	env.base_url			# optional, default to https://api.weather.com/v2/pws/observations/current
28 28
	env.connect_timeout 1		# optional, amount to wait for requests, in seconds
29
	env.alerts yes			# optional, controls whether to report alerts, enabled by default
29 30

  
30 31
Alternatively, the station_id can be encoded in the name of the symlink as
31 32
wunderground_STATIONID (e.g., wundergound_KCASANFR1708). This allows to monitor
......
78 79
UNITS=${units:-metric}
79 80
BASE_URL=${base_url:-https://api.weather.com/v2/pws/observations/current}
80 81
CONNECT_TIMEOUT=${connect_timeout:-1}
82
if [ "${alerts:-yes}" = yes ]; then
83
	USE_ALERTS=yes
84
fi
81 85

  
82 86
UNITS_ARG='&units=m'
83 87
DISTANCE_UNIT='m'
......
203 207

  
204 208
windChill.label Wind chill
205 209
windChill.info Represent the lowering of body temperature due to the passing-flow of lower-temperature air.  Wind chill numbers are always lower than the air temperature for values where the formula is valid. When the apparent temperature is higher than the air temperature, the heat index is used instead.
210
${USE_ALERTS:+
206 211
windChill.warning ${WIND_CHILL_CAUTION}
207 212
windChill.critical ${WIND_CHILL_DANGER}
213
}
208 214
windChillCaution.label Wind chill Caution
209 215
windChillCaution.info Danger of frostbite
210 216
windChillCaution.colour 5358f6
......
216 222

  
217 223
heatIndex.label Heat index
218 224
heatIndex.info Index that combines air temperature and relative humidity, in shaded areas, to posit a human-perceived equivalent temperature, as how hot it would feel if the humidity were some other value in the shade.
225
${USE_ALERTS:+
219 226
heatIndex.warning ${HEAT_INDEX_EXTREME_CAUTION}
220 227
heatIndex.critical ${HEAT_INDEX_DANGER}
228
}
221 229
heatIndexCaution.label Heat index Caution
222 230
heatIndexCaution.info Fatigue is possible with prolonged exposure and activity. Continuing activity could result in heat cramps.
223 231
heatIndexCaution.colour ffff66
......
243 251
graph_vlabel UV index
244 252
uv.label UV index
245 253
uv.min 0
254
${USE_ALERTS:+
246 255
uv.warning 5
247 256
uv.critical 7
257
}
248 258
moderate.label Moderate
249 259
moderate.info Stay in shade near midday when the Sun is strongest. If outdoors, wear Sun protective clothing, a wide-brimmed hat, and UV-blocking sunglasses. Generously apply broad spectrum SPF 30+ sunscreen every 1.5 hours, even on cloudy days, and after swimming or sweating. Bright surfaces, such as sand, water, and snow, will increase UV exposure.
250 260
moderate.colour fff300

Formats disponibles : Unified diff