>
> $current.windGust.km_per_hour.formatted
> $current.windDir.ordinal_compass
>
> However, when the first is low (< 2), the latter is N/A. I understand the
> logic behind this behaviour, but is there a way to get a numeric value,
> e.g. 0 ?
>
>
In weewx.conf, change this
[[[[Ordinates]]]]
# Ordinal directions. The last one is for no wind direction
directions = N, NNE, NE, ENE, E, ESE, SE, SSE, S, SSW, SW, WSW, W, WNW,
NW, NNW, N/A
to this
[[[[Ordinates]]]]
# Ordinal directions. The last one is for no wind direction
directions = N, NNE, NE, ENE, E, ESE, SE, SSE, S, SSW, SW, WSW, W,
WNW, NW, NNW, 0
Alternatively, is there a way to change the second line to something like
>
> if ($current.windGust.km_per_hour.formatted > 2):
> $current.windDir.ordinal_compass
> else:
> 0
>
>
If you don't like option 1, yes, this is possible. It would look something
like (NOT TESTED):
#if $current.windGust.km_per_hour.raw > 2
$current.windDir.orginal_compass
#else
0
#end if
Depending on how your HTML is formatted, you may need a #slurp directive in
there. See the chapter *Language Overview
<http://cheetahtemplate.org/users_guide/language.html>* in the Cheetah
documentation.
-tk
--
You received this message because you are subscribed to the Google Groups
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.