diff options
-rwxr-xr-x | pellematic-temp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/pellematic-temp b/pellematic-temp index c3b84b5..cdc5aa2 100755 --- a/pellematic-temp +++ b/pellematic-temp @@ -114,13 +114,16 @@ graph_category Heating graph_info This graph shows different temperture values as displayed by a Pelletronic Touch 2.0 by Ökofen""" out = fetch_raw(url) + names = [] for item in out: if item['name'] in items.keys(): - name = items[item['name']] - print "%s.label %s" % (canon(name), name) - print "%s.type GAUGE" % canon(name) - thickness = 1 if is_preset(name) else 2 - print "%s.draw LINE%d" % (canon(name), thickness) + names.append(items[item['name']]) + + for name in sorted(names): + print "%s.label %s" % (canon(name), name) + print "%s.type GAUGE" % canon(name) + thickness = 1 if is_preset(name) else 2 + print "%s.draw LINE%d" % (canon(name), thickness) def degree_celsius(val): return float(int(val['value'])) / float(val['divisor']) |