Perfect!  I saw the .raw in the customizing reports but never thought to try it.

 

Thanks Andy.

Tom

 

From: weewx-user@googlegroups.com <weewx-user@googlegroups.com> On Behalf Of 
Andrew Milner
Sent: Monday, January 7, 2019 12:31 PM
To: weewx-user <weewx-user@googlegroups.com>
Subject: [weewx-user] Re: #IF #ELSE in Index.html.tmpl

 

try 

 

if $current.rainRate.raw == 0.00


On Monday, 7 January 2019 20:07:47 UTC+2, nine...@gmail.com 
<mailto:nine...@gmail.com>  wrote:

No laughing please.  I’m trying to learn.

 

I want to make the value for Rain Rate RED when it is raining.  For some reason 
my code always default to the ELSE statement.  I have spent way too much time 
trying different options and internet searches so it is time to ask for help.  
My basic code:

 

#if $current.rainRate == 0.00

              <tr>

                <td class="stats_label">Rain Rate</td>

                <td class="stats_data">$current.rainRate</td>

              </tr>

                #else

                <tr>

                <td class="stats_label">Rain Rate</td>

                <td style="background-color:red"> $current.rainRate</td> 

              </tr>

              #end if

 

Since it is not raining current.rain.Rate = 0 but my display is showing in red 
which is the ELSE statement.

 

I’m sure it is something very basic.

 

Tom

-- 
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+unsubscr...@googlegroups.com 
<mailto:weewx-user+unsubscr...@googlegroups.com> .
For more options, visit https://groups.google.com/d/optout 
<https://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Foptout&data=02%7C01%7C%7Ca354474a52e0411cceb508d674ce411e%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636824826529120977&sdata=E%2B5cL6NtN2HoWh%2Bbp1sy2U4EBUc7HiNeqglE8HcEnEg%3D&reserved=0>
 .

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

Reply via email to