Formatting numbers in 'Current' and 'Hi/Lo' Reports

35 views
Skip to first unread message

Peter Fletcher

unread,
Jul 18, 2025, 6:59:37 PMJul 18
to weewx-development
Is there a way in the relevant .inc files of overriding the default numeric formatting (which seems to be) defined by the group a data value is included in? The predefined power group appears to want to use one decimal place, and no thousands separator. Because of the magnitude of the numbers I am displaying, I would like to have whole numbers with a thousands separator. The customization section of the manual does not seem to address this particular aspect of customization.

Tom Keffer

unread,
Jul 20, 2025, 8:19:08 PMJul 20
to Peter Fletcher, weewx-development
Whole numbers can easily be specified with a custom format. Something like:

$week.power.sum.format("%.0f")

Unfortunately, use of thousands separators depends on the specified locale and cannot be overridden. It really should be.





On Fri, Jul 18, 2025 at 3:59 PM 'Peter Fletcher' via weewx-development <weewx-de...@googlegroups.com> wrote:
Is there a way in the relevant .inc files of overriding the default numeric formatting (which seems to be) defined by the group a data value is included in? The predefined power group appears to want to use one decimal place, and no thousands separator. Because of the magnitude of the numbers I am displaying, I would like to have whole numbers with a thousands separator. The customization section of the manual does not seem to address this particular aspect of customization.

--
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/80308a49-183d-4592-8898-529890835d70n%40googlegroups.com.

Peter Fletcher

unread,
Jul 20, 2025, 10:33:08 PMJul 20
to weewx-development
I have implemented a workaround by putting in conditionals to display power values greater than 1000W as kW, which avoids the thousands separator issue. The whole thing is a bit odd, because my locale is US, which I thought should be using the separators by default.
Reply all
Reply to author
Forward
0 new messages