Thank you!

I followed your advice. Work like a charm ;-) 
https://monsegaard.no/site/daglige-data/

torsdag 8. mars 2018 12.16.43 UTC+1 skrev gjr80 følgende:
>
> Hi,
>
> Yes making a change to that line and adding a $useThisFormat parameter as 
> follows would do what you want:
>
> #*WD|006*#$current.barometer.hPa.toString($addLabel=False, 
> $useThisFormat='%.0f', $localize=False) #slurp
>
> but I would strongly advise against this. The reason being that any 
> changes made to the template files would be overwritten should you upgrade 
> weeWX-WD in the future. A far bettter, and upgrade safe, approach is to 
> override the hPa formatting from weewx.conf. In weewx.conf under 
> [StdReport] amend the [[wdClientraw]] stanza to look something like:
>
>     [[wdClientraw]]
>         HTML_ROOT = public_html/WD
>         skin = Clientraw
>         [[[Units]]]
>             [[[[StringFormats]]]]
>                 hPa = %.0f
>
> This has the benefit of being upgrade safe, though now all hPa pressures 
> will have no places after the decimal point. If you particularly want to 
> change just the current barometric pressure then you would need to make the 
> change to clientraw.txt.tmpl but you will then have to manually handle 
> any future weeWX-WD upgrades.
>
> Gary
>
> On Thursday, 8 March 2018 18:26:29 UTC+10, Arild M. Halvorsen wrote:
>>
>> I want to change the format for the barometer pressure value. I want no 
>> desimal values.
>>
>> The clientraw.txt field 6 gives barometer pressure with one desimal e.g. 
>> 998.3 I want only 998 for better design 
>> https://monsegaard.no/site/daglige-data/ 
>>
>> In /etc/weewx/skins/Clientraw/clientraw.txt.tmpl I found this line: 
>>
>> #*WD|006*#$current.barometer.hPa.toString($addLabel=False, 
>> $localize=False) #slurp
>>
>> *Maybe can change format here?*
>>
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to