From 082481a24452f418afb69e4da70aa11b5bcd8404 Mon Sep 17 00:00:00 2001 From: Jon Ziebell Date: Mon, 18 Nov 2019 15:05:39 -0500 Subject: [PATCH] Fixed #189 - Accessory data not showing up on Recent Activity When I updated to 1.4 I made a change to prevent this chart from breaking since the normal accessory columns went missing. Forgot to fix it. --- js/component/card/recent_activity.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/js/component/card/recent_activity.js b/js/component/card/recent_activity.js index 6f31b14..6a1dbf0 100755 --- a/js/component/card/recent_activity.js +++ b/js/component/card/recent_activity.js @@ -883,11 +883,18 @@ beestat.component.card.recent_activity.prototype.get_series_ = function() { runtime_thermostat.compressor_cool_2 = null; } + // Set these to 0 because they don't exist anymore. runtime_thermostat.humidifier = 0; runtime_thermostat.dehumidifier = 0; runtime_thermostat.ventilator = 0; runtime_thermostat.economizer = 0; + // Now set one to an appropriate value to make the rest of the code work. + if (runtime_thermostat.accessory_type !== 'off') { + runtime_thermostat[runtime_thermostat.accessory_type] = runtime_thermostat.accessory; + } + + // The string includes +00:00 as the UTC offset but moment knows what time // zone my PC is in...or at least it has a guess. This means that beestat // graphs can now show up in local time instead of thermostat time.