Where to put format to round data in Standard skin

66 views
Skip to first unread message

bgra...@umw.edu

unread,
Feb 4, 2024, 12:07:47 PM2/4/24
to weewx-user
I have added a Geiger counter to my weewx (4.10.2) Standard page and am getting too many decimal points:
          Radiation Level CPM 13.500000 at 11:45
The format (I think) should be:
            [[[[StringFormats]]]]
                        cpm = %.0f

Data topic is coming from MQTTsubscribe in weewx.conf:
     [[[gccpm]]]
                name = signal1
                [[[[message]]]]
                        type = individual

I've read the wiki sections about how to customize but can't figure out what I'm doing wrong. The gccpm data is being stored in "signal1" of weewx.sdb.
Thanks in advance for any help.

Cheers,
Bob

John Smith

unread,
Feb 4, 2024, 1:57:17 PM2/4/24
to weewx...@googlegroups.com
On Mon, 5 Feb 2024 at 04:07, bgra...@umw.edu <bgra...@umw.edu> wrote:
The format (I think) should be:
            [[[[StringFormats]]]]
                        cpm = %.0f

Shouldn't that be %0.1f? 

Tom Keffer

unread,
Feb 4, 2024, 2:30:25 PM2/4/24
to weewx...@googlegroups.com
In the absence of any information about what unit group a measurement belongs to, WeeWX formats the number as a string, which usually leads to an abundance of digits beyond the decimal point.

Be sure to assign the measurement to a unit group. See the section Assigning a unit group in the Customizing Guide.

--
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 on the web visit https://groups.google.com/d/msgid/weewx-user/057f0012-e18e-4db8-9940-96fcf66e8fa0n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages