- if (! name) { name = sensor_path; }
- units = properties["units"][sensor_path];
- scale = properties["scale"][sensor_path];
- color = properties["colors"][sensor_path];
- if (scale) {
- value = (scale[0] * value).toFixed(scale[1]);
+ if (! name.startsWith("-")) {
+ value = returnedData[sensor_id][sensor][param];
+ if (! name) { name = sensor_path; }
+ units = properties["units"][sensor_path];
+ scale = properties["scale"][sensor_path];
+ color = properties["colors"][sensor_path];
+ if (scale) {
+ value = (scale[0] * value).toFixed(scale[1]);
+ }
+ if (! color) {
+ color = value_color;
+ }
+ var section = template.replace(/\$SENSOR_ID/g,sensor_id);
+ section = section.replace(/\$SENSOR/g,sensor);
+ section = section.replace(/\$PARAM/g,param);
+ section = section.replace(/\$NAME/g,name);
+ section = section.replace(/\$UNITS/g,units);
+ section = section.replace(/\$VALUE/g,value);
+ section = section.replace(/\$COLOR/g,color);
+ section = section.replace(/\$TIMESTAMP/g,timestamp);
+ html = html + section;