Error in kPa

47 views
Skip to first unread message

Jacques Desroches

unread,
Dec 11, 2024, 7:58:16 PM12/11/24
to weewx-development
Hi,
In Canada, we display barometer in kPa (with only one decimal)
but when pressure is below 1000kPa, Weewx display only 2 digits 
(99,xxkPa instead of 999,xx), is this a bug?

Regards,
Jacques

Tom Keffer

unread,
Dec 11, 2024, 8:04:18 PM12/11/24
to Jacques Desroches, weewx-development
Hello, Jacques

Which skin, and where? 

--
You received this message because you are subscribed to the Google Groups "weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-developm...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/weewx-development/8973d6f9-684f-4333-ab1a-9f12c647a9den%40googlegroups.com.

Jacques Desroches

unread,
Dec 11, 2024, 8:31:49 PM12/11/24
to weewx-development
Hi Tom,

I'm using my own template for my site (www.meteostours.ca)
and display barometer pressure with this command : 

$current.barometer.kPa.format(add_label=False)

I'm working to adapt my other templates (on weatherbyyou.com) to weewx

Regards,
Jacques

Tom Keffer

unread,
Dec 11, 2024, 8:42:29 PM12/11/24
to Jacques Desroches, weewx-development
I'm a little confused here. Pressure in kPa is usually around 100 kPa, not 1000. Are you sure you don't mean hPa or mbar?

Jacques Desroches

unread,
Dec 11, 2024, 8:55:37 PM12/11/24
to weewx-development
Hi Tom,

Sorry, I was confused about hPa (in Cumulus) and the kPa.
Could you tell me how to display it with only one decimal?

Thanks,
Jacques

Tom Keffer

unread,
Dec 12, 2024, 6:02:10 PM12/12/24
to Jacques Desroches, weewx-development
It's treated the same as any other override. In weewx.conf:

[StdReport]
  ...
  [[Defaults]]
    ...
    [[[Units]]]
      ...
      [[[[StringFormats]]]]
        kPa = %.1f






Reply all
Reply to author
Forward
0 new messages