Mercurial > templog
comparison web/log.py @ 483:93af94e6bd9d
param editor roughly working
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 04 Feb 2014 23:39:06 +0800 |
parents | 9950ffa9a79b |
children | cbe14244a372 |
comparison
equal
deleted
inserted
replaced
482:9950ffa9a79b | 483:93af94e6bd9d |
---|---|
258 'fridge_setpoint': 16, | 258 'fridge_setpoint': 16, |
259 'fridge_difference': 0.2, | 259 'fridge_difference': 0.2, |
260 'overshoot_delay': 720, # 12 minutes | 260 'overshoot_delay': 720, # 12 minutes |
261 'overshoot_factor': 1, # ºC | 261 'overshoot_factor': 1, # ºC |
262 'disabled': False, | 262 'disabled': False, |
263 'nowort': False, | 263 'nowort': True, |
264 'fridge_range_lower': 3, | 264 'fridge_range_lower': 3, |
265 'fridge_range_upper': 3, | 265 'fridge_range_upper': 3, |
266 } | 266 } |
267 | 267 |
268 r = [] | 268 r = [] |
272 if v: | 272 if v: |
273 n['value'] = "true" | 273 n['value'] = "true" |
274 kind = 'yesno' | 274 kind = 'yesno' |
275 else: | 275 else: |
276 kind = 'number' | 276 kind = 'number' |
277 n['amount'] = 0.1; | |
278 if k == 'overshoot_delay': | |
279 n['unit'] = ' sec' | |
280 n['amount'] = 60 | |
281 else: | |
282 n['unit'] = 'º' | |
277 n['kind'] = kind | 283 n['kind'] = kind |
284 n['title'] = k | |
278 r.append(n) | 285 r.append(n) |
286 | |
279 return json.dumps(r, sort_keys=True, indent=4) | 287 return json.dumps(r, sort_keys=True, indent=4) |