From 5d3d298a8de146af02e74f4497ee64099c67bdac Mon Sep 17 00:00:00 2001 From: TrystanLea Date: Thu, 16 Nov 2023 09:57:00 +0000 Subject: [PATCH] fix cop in window in power view --- apps/OpenEnergyMonitor/myheatpump/myheatpump.js | 9 +++++++++ apps/OpenEnergyMonitor/myheatpump/myheatpump.php | 2 +- module.json | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/apps/OpenEnergyMonitor/myheatpump/myheatpump.js b/apps/OpenEnergyMonitor/myheatpump/myheatpump.js index 551ceddd..3a1bed94 100644 --- a/apps/OpenEnergyMonitor/myheatpump/myheatpump.js +++ b/apps/OpenEnergyMonitor/myheatpump/myheatpump.js @@ -999,6 +999,14 @@ function powergraph_load() if (heat_enabled) heat_mean = feedstats["heatpump_heat"].mean; if (elec_mean>0) { $("#window-cop").html((heat_mean / elec_mean).toFixed(2)); + + var tooltip_text = ""; + tooltip_text += "Electric: "+feedstats["heatpump_elec"].kwh.toFixed(1)+" kWh\n"; + if (feedstats["heatpump_heat"]!=undefined) { + tooltip_text += "Heat: "+feedstats["heatpump_heat"].kwh.toFixed(1)+" kWh\n"; + } + $("#window-cop").attr("title",tooltip_text); + if (feedstats["heatpump_heat"]!=undefined) { $("#standby_cop").html((feedstats["heatpump_heat"].kwh / (feedstats["heatpump_elec"].kwh-standby_kwh)).toFixed(2)); } else { @@ -1243,6 +1251,7 @@ function bargraph_load(start,end) tooltip_text += "Heat: "+heat_kwh_in_window.toFixed(0)+" kWh ("+(heat_kwh_in_window/days_heat).toFixed(1)+" kWh/d)\n"; tooltip_text += "Days: "+days_elec; $("#window-cop").attr("title",tooltip_text); + $("#window-carnot-cop").html(""); set_url_view_params('daily',start,end); diff --git a/apps/OpenEnergyMonitor/myheatpump/myheatpump.php b/apps/OpenEnergyMonitor/myheatpump/myheatpump.php index 6b197dc0..6c67afac 100644 --- a/apps/OpenEnergyMonitor/myheatpump/myheatpump.php +++ b/apps/OpenEnergyMonitor/myheatpump/myheatpump.php @@ -268,4 +268,4 @@ config.name = ""; config.db = ; - + diff --git a/module.json b/module.json index e2b56c74..8dde2bdb 100644 --- a/module.json +++ b/module.json @@ -1,6 +1,6 @@ { "name" : "App", - "version" : "2.7.8", + "version" : "2.7.9", "location" : "/var/www/emoncms/Modules", "branches_available": ["stable","master"] }