Skip to content

Commit

Permalink
fix cop in window in power view
Browse files Browse the repository at this point in the history
  • Loading branch information
TrystanLea committed Nov 16, 2023
1 parent ab3028b commit 5d3d298
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions apps/OpenEnergyMonitor/myheatpump/myheatpump.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion apps/OpenEnergyMonitor/myheatpump/myheatpump.php
Original file line number Diff line number Diff line change
Expand Up @@ -268,4 +268,4 @@
config.name = "<?php echo $name; ?>";
config.db = <?php echo json_encode($config); ?>;
</script>
<script type="text/javascript" src="<?php echo $path; ?>Modules/app/apps/OpenEnergyMonitor/myheatpump/myheatpump.js?v=71"></script>
<script type="text/javascript" src="<?php echo $path; ?>Modules/app/apps/OpenEnergyMonitor/myheatpump/myheatpump.js?v=72"></script>
2 changes: 1 addition & 1 deletion module.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name" : "App",
"version" : "2.7.8",
"version" : "2.7.9",
"location" : "/var/www/emoncms/Modules",
"branches_available": ["stable","master"]
}

0 comments on commit 5d3d298

Please sign in to comment.