diff web/log.py @ 101:fd8482365489

limit temps to 35º on graph
author Matt Johnston <matt@ucc.asn.au>
date Wed, 25 Jul 2012 23:03:10 +0800
parents 1a88bb989afb
children ef59da811986
line wrap: on
line diff
--- a/web/log.py	Tue Jul 17 21:58:49 2012 +0800
+++ b/web/log.py	Wed Jul 25 23:03:10 2012 +0800
@@ -70,7 +70,8 @@
         else:
             vname = 'temp%d' % n
             graph_args.append('DEF:raw%(vname)s=%(rrdfile)s:temp:AVERAGE' % locals())
-            graph_args.append('CDEF:%(vname)s=raw%(vname)s,0.1,*,2,+' % locals())
+            # limit max temp to 50
+            graph_args.append('CDEF:%(vname)s=raw%(vname)s,35,GT,UNKN,raw%(vname)s,0.1,*,2,+,IF' % locals())
             unit = '<span face="Liberation Serif">º</span>C'
 
         last_value = float(rrdtool.info(rrdfile)['ds[temp].last_ds'])