Weather by You!
Templates and Projects support => Php templates => Topic started by: dmb on October 03, 2012, 06:08:32 AM
-
I've searched the forum to see if this has been reported but found no matches so hopefully I'm not reporting old news !
I'm running pywws with the weatherbyyou template, but I notice that rainfall is reported as negative amounts on the "Last hour" page, which uses 1hrs.txt. For example, I get figures like -0.3mm, -0.6mm etc.
I can't work out what the template is doing as I'm an uber-newbie with pywws template language, but wonder if anyone else is seeing this ? I've checked that I have the original templates in use, and that the problem isn't due to my messing anything up in the template :-)
Thanks for help,
David
-
Hi,
I had the same problem with negative rain values; I solved it by changing a line in 1hrs.txt file
from
<td>#calc "data['rain'] - prevdata['rain']" "%.1f <small>mm</small>"#</td>
to
<td>#calc "prevdata['rain'] - data['rain']" "%.1f <small>mm</small>"#</td>
Now seems to run properly (but not sure, if the value appears in the right line, or should be +/- 1 row??
Regards,
Jimicek