From 98522ab19192a7955c720f9fbe3c543f2fd77214 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Fri, 22 Jan 2016 19:51:25 -0500 Subject: [PATCH] use lastUpdated to graph thermostat history This allows us to use lastUpdated in the thermostat graphs. Currently this will produce the same result as lastChanged, however once the history module is updated to expose all the updates for the thermostat domain. --- package.json | 2 +- src/components/state-history-chart-line.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 7ac368d39b..24518b5e7b 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "author": "Paulus Schoutsen (http://paulusschoutsen.nl)", "license": "MIT", "dependencies": { - "home-assistant-js": "git+https://github.com/balloob/home-assistant-js.git#b6909b2765077d100131b2db126cd042aec1db5f", + "home-assistant-js": "git+https://github.com/balloob/home-assistant-js.git#a6ba8f88f5f0cfc09a4472fbda8d08e752358cee", "lodash": "^3.10.0", "moment": "^2.11.1" }, diff --git a/src/components/state-history-chart-line.js b/src/components/state-history-chart-line.js index 4495437e10..2e19060796 100644 --- a/src/components/state-history-chart-line.js +++ b/src/components/state-history-chart-line.js @@ -145,7 +145,7 @@ export default new Polymer({ const curTemp = saveParseFloat(state.attributes.current_temperature); const targetHigh = saveParseFloat(state.attributes.target_temp_high); const targetLow = saveParseFloat(state.attributes.target_temp_low); - pushData([state.lastChangedAsDate, curTemp, targetHigh, targetLow], noInterpolations); + pushData([state.lastUpdatedAsDate, curTemp, targetHigh, targetLow], noInterpolations); }; } else { dataTable.addColumn('number', `${name} target temperature`); @@ -155,7 +155,7 @@ export default new Polymer({ processState = state => { const curTemp = saveParseFloat(state.attributes.current_temperature); const target = saveParseFloat(state.attributes.temperature); - pushData([state.lastChangedAsDate, curTemp, target], noInterpolations); + pushData([state.lastUpdatedAsDate, curTemp, target], noInterpolations); }; }