var daily = feed.getdata(use_kwh,start*1000,end*1000,"daily",0,1);
var usetoday_kwh = null;
if (daily.length>0) {
usetoday_kwh = daily[daily.length-1][1];
}
if (usetoday_kwh!==null) {
if (usetoday_kwh<100) {
$("#usetoday").html((usetoday_kwh).toFixed(1));
} else {
$("#usetoday").html((usetoday_kwh).toFixed(0));
}
} else {
$("#usetoday").html("---");
}
in the My Electric app makes no distinction between the "energy" and "cost" modes, resulting in the cost today being the kWh used today. The logic applied elsewhere in the file for current usage -> current cost should be applied here too, branching on the energy vs cost operating mode.
The code block
in the My Electric app makes no distinction between the "energy" and "cost" modes, resulting in the cost today being the kWh used today. The logic applied elsewhere in the file for current usage -> current cost should be applied here too, branching on the energy vs cost operating mode.