comparison web/log.py @ 286:61269311ed3d

wrong degree symbol
author Matt Johnston <matt@ucc.asn.au>
date Mon, 20 Feb 2017 23:23:57 +0800
parents 6c14e0573f50
children 95f704ce809d
comparison
equal deleted inserted replaced
280:6c14e0573f50 286:61269311ed3d
102 else: 102 else:
103 vname = 'temp%d' % n 103 vname = 'temp%d' % n
104 graph_args.append('DEF:raw%(vname)s=%(rrdfile)s:temp:AVERAGE' % locals()) 104 graph_args.append('DEF:raw%(vname)s=%(rrdfile)s:temp:AVERAGE' % locals())
105 # limit max temp to 50 105 # limit max temp to 50
106 graph_args.append('CDEF:%(vname)s=raw%(vname)s,38,GT,UNKN,raw%(vname)s,%(volts_mult)f,*,%(volts_shift)f,+,IF' % locals()) 106 graph_args.append('CDEF:%(vname)s=raw%(vname)s,38,GT,UNKN,raw%(vname)s,%(volts_mult)f,*,%(volts_shift)f,+,IF' % locals())
107 unit = '<span face="Liberation Serif">º</span>C' 107 unit = '<span face="Liberation Serif">°</span>C'
108 108
109 format_last_value = None 109 format_last_value = None
110 if unit: 110 if unit:
111 try: 111 try:
112 last_value = float(rrdtool.info(rrdfile)['ds[temp].last_ds']) 112 last_value = float(rrdtool.info(rrdfile)['ds[temp].last_ds'])
289 # types used here define the type of a field 289 # types used here define the type of a field
290 _FIELD_DEFAULTS = { 290 _FIELD_DEFAULTS = {
291 'fridge_setpoint': 16.0, 291 'fridge_setpoint': 16.0,
292 'fridge_difference': 0.2, 292 'fridge_difference': 0.2,
293 'overshoot_delay': 720, # 12 minutes 293 'overshoot_delay': 720, # 12 minutes
294 'overshoot_factor': 1.0, # ºC 294 'overshoot_factor': 1.0, # °C
295 'disabled': False, 295 'disabled': False,
296 'nowort': True, 296 'nowort': True,
297 'fridge_range_lower': 3, 297 'fridge_range_lower': 3,
298 'fridge_range_upper': 3, 298 'fridge_range_upper': 3,
299 } 299 }
317 if k == 'overshoot_delay': 317 if k == 'overshoot_delay':
318 n['unit'] = ' sec' 318 n['unit'] = ' sec'
319 n['amount'] = 60 319 n['amount'] = 60
320 n['digits'] = 0; 320 n['digits'] = 0;
321 else: 321 else:
322 n['unit'] = 'º' 322 n['unit'] = '°'
323 n['amount'] = 0.1; 323 n['amount'] = 0.1;
324 n['digits'] = 1; 324 n['digits'] = 1;
325 n['kind'] = kind 325 n['kind'] = kind
326 n['title'] = k 326 n['title'] = k
327 r.append(n) 327 r.append(n)