From bb61c33a4bb8427c540be3b0e101328df38ceb1b Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Tue, 19 Jul 2016 02:36:11 -0700 Subject: [PATCH] Remove last pieces of ES6 --- src/components/state-history-chart-line.html | 16 ++++++------ src/components/state-history-charts.html | 2 +- src/home-assistant.html | 2 +- src/more-infos/more-info-group.html | 26 +++++++++++--------- src/more-infos/more-info-hvac.html | 4 +-- 5 files changed, 27 insertions(+), 23 deletions(-) diff --git a/src/components/state-history-chart-line.html b/src/components/state-history-chart-line.html index d023617205..873d1accb4 100644 --- a/src/components/state-history-chart-line.html +++ b/src/components/state-history-chart-line.html @@ -6,8 +6,9 @@ function range(start, end) { var result = []; + var i; - for (let i = start; i < end; i++) { + for (i = start; i < end; i++) { result.push(i); } @@ -151,14 +152,15 @@ // We differentiate between thermostats that have a target temperature // range versus ones that have just a target temperature hasTargetRange = states.reduce( - (cum, cur) => cum || cur.attributes.target_temp_high !== cur.attributes.target_temp_low, - false); + function (cum, cur) { + return cum || cur.attributes.target_temp_high !== cur.attributes.target_temp_low; + }, false); - dataTable.addColumn('number', `${name} current temperature`); + dataTable.addColumn('number', name + ' current temperature'); if (hasTargetRange) { - dataTable.addColumn('number', `${name} target temperature high`); - dataTable.addColumn('number', `${name} target temperature low`); + dataTable.addColumn('number', name + ' target temperature high'); + dataTable.addColumn('number', name + ' target temperature low'); noInterpolations = [false, true, true]; @@ -169,7 +171,7 @@ pushData([state.lastUpdatedAsDate, curTemp, targetHigh, targetLow], noInterpolations); }; } else { - dataTable.addColumn('number', `${name} target temperature`); + dataTable.addColumn('number', name + ' target temperature'); noInterpolations = [false, true]; diff --git a/src/components/state-history-charts.html b/src/components/state-history-charts.html index 0df3dad2ac..e4aa90954d 100644 --- a/src/components/state-history-charts.html +++ b/src/components/state-history-charts.html @@ -108,7 +108,7 @@ Polymer({ } stateWithUnit = stateInfo.find( - (state) => 'unit_of_measurement' in state.attributes); + function (state) { return 'unit_of_measurement' in state.attributes; }); unit = stateWithUnit ? stateWithUnit.attributes.unit_of_measurement : false; diff --git a/src/home-assistant.html b/src/home-assistant.html index 0ead4d02ac..6e92f71a42 100644 --- a/src/home-assistant.html +++ b/src/home-assistant.html @@ -13,7 +13,7 @@ - +