Wind.vecdir.ordinal_compass without format

125 views
Skip to first unread message

Dani Talens

unread,
Nov 23, 2024, 7:37:42 AM11/23/24
to weewx-user
Hi,

Is it not possible to apply formatting to the $day.wind.vecdir.ordinal_compass? 
I can apply format to $day.wind.vecdir with formatting options. For example, $day.wind.vecdir.format(format_string="%6.0f",$NONE,add_label=False).

Thanks,

Captura de pantalla de 2024-11-23 13-30-54.png

Tom Keffer

unread,
Nov 23, 2024, 3:28:08 PM11/23/24
to weewx...@googlegroups.com
I'm not sure what you're looking for. Does option "directions" not satisfy your needs?

--
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 weewx-user+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/weewx-user/3c92253e-5e6a-4522-b3b0-1e799dae95b1n%40googlegroups.com.

Dani Talens

unread,
Nov 24, 2024, 3:46:20 AM11/24/24
to weewx...@googlegroups.com

Hello Tom,

What I would like is to be able to apply the "format" and "ordinal_compass" options at the same time. When testing it only shows the ordinal points but does not apply format. For e ample, $day.wind.vecdir.ordinal_compass.format(format_string="%6.0f") shows ordinal points but not apply format.

Thanks,


El ds., 23 de nov. 2024, 21:28, Tom Keffer <tke...@gmail.com> va escriure:
You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/dOVejRsNKm4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/weewx-user/CAPq0zEA4GLJPXbLSUCeiSwx9ijHHyJPeWxvpgsRUHs0FbprNKA%40mail.gmail.com.

Tom Keffer

unread,
Nov 24, 2024, 10:23:44 AM11/24/24
to weewx...@googlegroups.com
The "ordinal_compass" is the optional formatting. It requires no format string. 

If you want both, then you must specify both. With optional formatting for the wind direction, it would look something like this:

$current.windDir.ordinal_compass ($current.windDir.format("%6.0f"))

This results in 

NE (45.0º)

-tk



Rich Strle

unread,
Nov 25, 2024, 8:02:58 AM11/25/24
to weewx-user
Does the format instruction go into skin.conf under 

[[[windDir]]]
   $current.windDir.ordinal_compass ($current.windDir.format("%6.0f"))

Tom Keffer

unread,
Nov 25, 2024, 10:14:18 AM11/25/24
to weewx...@googlegroups.com
No. The snippet

$current.windDir.ordinal_compass ($current.windDir.format("%6.0f"))

is used in a Cheetah template.


Dani Talens

unread,
Nov 25, 2024, 11:32:49 AM11/25/24
to weewx...@googlegroups.com

Ok, thanks Tom.


El dl., 25 de nov. 2024, 16:14, Tom Keffer <tke...@gmail.com> va escriure:
Reply all
Reply to author
Forward
0 new messages