Well you WANTED accuracy, you're getting accuracy :-)

I know you figured it out, but be forewarned that the Cheetah engine under 
the hood here is very finicky and debugging things when you have even the 
slightest typo can get very frustrating.   Definitely make small changes 
one at a time and keep your modifications in a version control system such 
as git.  You'll thank yourself later.

Incidentally - Cheetah is a third-party thing weewx relies on, so it's not 
anything anybody here can fix.  It is what it is.  Sometimes you have to go 
with it.  It's powerful but yes it can make you a little crazy when it 
throws a fit.

Hint for the future - go through the formatting examples 
<https://weewx.com/docs/customizing.htm#Formatting_examples> in the 
Customization guide.   It'll make how to tweak things more obvious.  In 
fact, you should at least scan the whole Customization guide 
<https://weewx.com/docs/customizing.htm> and the other large sets of info 
in the wiki <https://github.com/weewx/weewx/wiki> and the FAQ 
<https://github.com/weewx/weewx/wiki/WeeWX-Frequently-Asked-Questions>.
 
On Friday, December 3, 2021 at 12:43:40 AM UTC-8 [email protected] wrote:

> eeeek.
>
>
> Battery OK - 2.6226000000000003
>
> k, how do I format a float in this cheetah template language?  I mean, I 
> assume thats what sensor.inc is ?
>
> #if $x >= 2.455
> <span class="status_ok">OK - *$x*</span>
> #else
> #if $x >= 2.41
> <span class="status_low">LOW - mode 1 - *$x*</span>
> #else
> #if $x >= 2.39
> <span class="status_low">LOW - mode 2 - *$x*</span>
> #else
> <span class="status_low">LOW - mode 3 - *$x*</span>
> #end if
> #end if
> #end if
>
>
>

-- 
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/fa850573-3052-4f98-bfa9-f3847dfd7c0cn%40googlegroups.com.

Reply via email to