On Saturday, January 14, 2017 at 9:34:08 AM UTC-5, Joachim Puttkammer wrote:
>
> the value of the variable '$current.txBatteryStatus'  has six digits after 
> the decimal point ( on my site )
> One or two digits are enough, but what to do to cut the last digits?
>

what kind of hardware are you using?

my understanding is that any BatteryStatus value should be either 0 (ok) or 
1 (low battery), and the Voltage variables would provide a quantitative 
measure.

you should be able to do this inline:

$current.txBatteryStatus.format("%.2f")

afaik, there are no units for battery status, so [Units][[StringFormat]] 
would not apply.

formatting is covered in the customization guide:

http://weewx.com/docs/customizing.htm#customizing_templates

m

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

Reply via email to