$current.windSpeed.format(add_label=False) is equivalent to
$current.windSpeed.formatted
The latter being a little shorter to type.

Instead of MPH, you could use $unit.label.windSpeed

> On Dec 20, 2020, at 4:01 PM, Rob Cranfill <[email protected]> wrote:
> 
> Thanks, all! Looks like there is more than one way to accomplish this, 
> thanks for the suggestions. :-)
> 
> I think I like the looks of this, which does what I want:
> 
> $current.windSpeed.format(add_label=False) &ndash; 
> $span($time_delta=1800).windSpeed.max.format(add_label=False) MPH
> 
> which gives me a result like "3 - 14 MPH", where the first number is the 
> current speed and the 2nd is the peak in the last 30 minutes.
> 
>> On Sunday, December 20, 2020 at 11:55:15 AM UTC-8 gjr80 wrote:
>> 
>> Have a look at the Formatting options section in the Customization Guide.
>>  
>> $xxxxx.windSpeed.raw will certainly give you a number (not a string) with no 
>> units and you can do whatever you want with the data but you will need to do 
>> all formatting manually. Also have a look at $xxxxx.windSpeed.format, it 
>> will give you a string and there are numerous arguments that can be passed 
>> to .format that do things such as omitting the units, specifying a format 
>> string, what to display if None etc. There are examples further down.
>> 
>> Gary 
>>> On Monday, 21 December 2020 at 05:28:01 UTC+10 [email protected] wrote:
>>> I'm making a skin to display on a small screen (a 7" RPi LCD) and would 
>>> like to format the wind speed myself, but $windSpeed and all other wind 
>>> values seem to include the "mph" string. Is there a tag that is just the 
>>> numeric value?
>>> 
>>> I guess one option is to use skin.conf to set the units to "", right? Is 
>>> there another way?
>>> 
>>> Thanks for any suggestions!
>>> 
> 
> -- 
> 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/73665327-8419-483a-b30e-10ac4ac6d750n%40googlegroups.com.

-- 
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/373CA63A-E3B0-4913-BA6A-21B07FEAE943%40johnkline.com.

Reply via email to