|
|
|
@ -88,7 +88,7 @@ class DeviceReadingDisplay {
|
|
|
|
|
this.reading_type = this.reading_types.find((type) => type.id == default_reading_type);
|
|
|
|
|
// Default to the 1st reading type if we can't find the default
|
|
|
|
|
if(typeof this.reading_type == "undefined")
|
|
|
|
|
this.reading_type = this.reading_types[0].id;
|
|
|
|
|
this.reading_type = this.reading_types[0];
|
|
|
|
|
|
|
|
|
|
// Create the reading type buttons
|
|
|
|
|
let reading_type_list = this.display.querySelector(".reading-types");
|
|
|
|
@ -186,7 +186,7 @@ class DeviceReadingDisplay {
|
|
|
|
|
new_data = JSON.parse(await GetFromUrl(`${this.config.api_root}?` + Postify({
|
|
|
|
|
action: "device-data",
|
|
|
|
|
"device-id": this.device_id,
|
|
|
|
|
"reading-type": this.reading_type.id,
|
|
|
|
|
"reading-type": this.reading_type.short_descr,
|
|
|
|
|
start: this.start_time.toISOString(),
|
|
|
|
|
end: this.end_time.toISOString(),
|
|
|
|
|
"average-seconds": average_seconds
|
|
|
|
|