I had to make quite complex meal in the meantime, so, now I can post the 
solution.

If someone wants to have name of the wind shown instead or in addition to 
Cardinal and numeric, here it is. This example will serve people at 
Croatian coast of Adriatic see without modification. It is easy to modify 
it for any other winds.

I modified Smartphone skin. Here are the steps. 

edit file (I installed by using setup.py): 
/home/weewx/skins/Smartphone/index.html.tmpl

Locate the line starting with:
<li><a href="wind.html">...

Just in front of it, goes the new code:

#if $current.windDir.raw >= 22.5 and $current.windDir.raw <= 67.5
   #set label = "Bura"
#elif $current.windDir.raw > 67.5 and $current.windDir.raw <= 112.5
   #set label = "Levanat"
#elif $current.windDir.raw > 112.5 and $current.windDir.raw <= 157.5
   #set label = "Jugo"
#elif $current.windDir.raw > 157.5 and $current.windDir.raw <= 202.5
   #set label = "O&scaron;tro"
#elif $current.windDir.raw > 202.5 and $current.windDir.raw <= 247.5
   #set label = "Lebi&cacute;"
#elif $current.windDir.raw > 247.5 and $current.windDir.raw <= 292.5
   #set label = "Pulenat"
#elif $current.windDir.raw > 292.5 and $current.windDir.raw <= 315
   #set label = "Maestral"
#elif $current.windDir.raw > 315 and $current.windDir.raw <= 360
   #set label = "Tramontana"
#else
   #set label = "Vjetar"
#end if

This last else is for anything not covered with the wind names. Since now I 
have proper wind names for all winds, I modified my basic printout into:

<li><a href="wind.html">$label: $current.windSpeed 
($current.windDir.ordinal_compass $current.windDir)</a></li>

so now my Wind ... line will look like:



*Bura: 3 km/h (ENE 63)*Bura (from $label) is the name of the correspondiing 
wind. The word "Wind" seems superfluos to me in this configuration. Now it 
tells me that the wind is Bura! But, should the wind name be empty, it will 
be filled with "Vjetar" (Croatian word for Wind).

Unrelated to the above code, note that I have changed display unit of the 
wind speed to km/h and that I added cardinal to the numeric directions. 

I hope this may be of use to others.

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/052f20e0-f79a-49d3-b197-7e3bb35336b0%40googlegroups.com.

Reply via email to