Skip to content

Commit

Permalink
Quick fix sprayer info
Browse files Browse the repository at this point in the history
  • Loading branch information
TheYOSH committed May 21, 2018
1 parent d307130 commit 641b1d3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions static/js/terrariumpi.js
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ function websocket_init(reconnect) {
break;

case 'environment':
$.each(['heater','humidity','light','cooler','watertank','moisture','ph','light'], function(index, value) {
$.each(['heater','sprayer','light','cooler','watertank','moisture','ph','light'], function(index, value) {
update_dashboard_environment(value, data.data[value]);
});
break;
Expand Down Expand Up @@ -679,7 +679,7 @@ function process_form() {
function prepare_form_data(form) {
var formdata = [];
var form_type = form.attr('action').split('/').pop();
var re = /(sensor|switch|webcam|light|humidity|watertank|moisture|heater|cooler|ph|door|profile|playlist)(_\d+)?_(.*)/i;
var re = /(sensor|switch|webcam|light|sprayer|watertank|moisture|heater|cooler|ph|door|profile|playlist)(_\d+)?_(.*)/i;
var matches = null;
var objectdata = {};
var prev_nr = -1;
Expand Down Expand Up @@ -1095,6 +1095,7 @@ function history_graph(name, data, type) {
break;

case 'humidity':
case 'sprayer':
case 'average_humidity':
case 'moisture':
val = formatNumber(val) + ' %';
Expand Down Expand Up @@ -1133,6 +1134,7 @@ function history_graph(name, data, type) {
};

switch (type) {
case 'sprayer':
case 'humidity':
case 'temperature':
case 'distance':
Expand Down Expand Up @@ -1530,6 +1532,7 @@ function update_dashboard_environment(name, data) {
case 'heater':
enabledColor = 'red';
break;
case 'sprayer':
case 'humidity':
case 'moisture':
indicator = '%';
Expand Down

0 comments on commit 641b1d3

Please sign in to comment.