diff options
Diffstat (limited to 'pellematic-temp')
-rwxr-xr-x | pellematic-temp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/pellematic-temp b/pellematic-temp index d61b365..f27cf39 100755 --- a/pellematic-temp +++ b/pellematic-temp @@ -85,6 +85,20 @@ def fixup(name): def canon(name): return re.sub(r"[^a-zA-Z0-9_]", "_", name) +def is_preset(name): + """ + Preset values are inconsistently named so return + so we have to decide manually. + """ + if name.endswith(' Set'): + return True + elif ' Limit ' in name: + return True + elif name == 'Room Temp Heating': + return True + else: + return False + def print_config(url): print """graph_title Pellematic Temperature values graph_vlabel Temperature in Degree Celsius @@ -97,7 +111,7 @@ graph_info This graph shows different temperture values as displayed by a Pellet name = fixup(item['shortText']) print "%s.label %s" % (canon(name), name) print "%s.type GAUGE" % canon(name) - thickness = 1 if name.endswith(' Set') else 2 + thickness = 1 if is_preset(name) else 2 print "%s.draw LINE%d" % (canon(name), thickness) def degree_celsius(val): |