Skip to content

Commit

Permalink
Add new graph setting. #848
Browse files Browse the repository at this point in the history
  • Loading branch information
theyosh committed Nov 4, 2023
1 parent 3c83a4e commit 16d0808
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions gui/assets/index.template.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
gitversion: '{% if authenticated %}{{gitversion}}{% endif %}',
graph_show_min_max_gauge : {{ graph_show_min_max_gauge }},
graph_smooth_value : {{ graph_smooth_value }},
graph_limit_min_max : {{ graph_limit_min_max }},
show_gauge_overview: {{ show_gauge_overview }},
auto_dark_mode : '{{ auto_dark_mode }}',
is_night : {{ is_night }},
Expand Down
1 change: 1 addition & 0 deletions terrariumDatabase.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ def create_defaults(version):
{"id": "all_gauges_on_single_page", "value": "false"},
{"id": "graph_smooth_value", "value": "0"},
{"id": "auto_dark_mode", "value": "false"},
{"id": "graph_limit_min_max", "value": "false"},
]

for setting in setting_defaults:
Expand Down
2 changes: 1 addition & 1 deletion terrariumEngine.py
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ def sensor_averages(self):
"limit_max": 0.0,
}

if sensor.error:
if sensor.error or sensor.value is None:
data[sensor.type]["error"] += 1
continue

Expand Down
1 change: 1 addition & 0 deletions terrariumWebserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ def unit_variables():
"graph_show_min_max_gauge": str(self.engine.settings["show_min_max_gauge"]).lower(),
"auto_dark_mode": str(self.engine.settings["auto_dark_mode"]).lower(),
"is_night": str(not (self.engine.weather is None or self.engine.weather.is_day)).lower(),
"graph_limit_min_max": str(self.engine.settings["graph_limit_min_max"]).lower(),
}

# Template functions
Expand Down

0 comments on commit 16d0808

Please sign in to comment.