$current.voltage.format("%.3f")

See the section on formatting
<http://www.weewx.com/docs/customizing.htm#formatting_options> in the
*Customizing
Guide*.



On Fri, May 20, 2022 at 6:56 PM Barry <[email protected]> wrote:

> Hi, using the Tempest Weather station, Weewx and Belchertown.
>
> The battery voltage reported from the Tempest via the UDP message is to 3
> decimal places:
>
>
> 'type': 'device_status', 'hub_sn': 'HB-00071538', 'timestamp': 1653091491,
> 'uptime': 2013501, 'voltage': *2.746*, 'firmware_revision': 164,
> 'type': 'obs_st', 'hub_sn': 'HB-00071538', 'obs': [[1653091491, 0.27,
> 1.47, 3.31, 201, 3, 992.91, 24.86, 61.75, 2055, 0.14, 17, 0.0, 0, 0, 0,
> *2.746*, 1
>
> In skins.conf [[StringFormats]] I have
> volt  = %.1f
>
> With a graph plotting the voltage the y-axis shows 2.6 2.65 2.7 etc which
> is fine, but when I display the voltage in Station Observations it goes to
> 6 decimal places 2.746000. The last 3 digits are always 000 so it looks
> like padding. How can I get the display to limit the voltage to 3 dec
> places?
>
> Barry
>
> --
> 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/cff284de-7eb5-4aef-9ab3-b8aeb41b50d6n%40googlegroups.com
> <https://groups.google.com/d/msgid/weewx-user/cff284de-7eb5-4aef-9ab3-b8aeb41b50d6n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CAPq0zECReyYZevGMX5YrExn-o%2BHDOxb0pUgh63Z6BTFU-xA77w%40mail.gmail.com.

Reply via email to