@@ -176,6 +176,7 @@ function getTranslations(){
176
176
'Cumulative solar generation in kWh': "<?php echo _ ('Cumulative solar generation in kWh ' ) ?> ",
177
177
'Cumulative grid import in kWh': "<?php echo _ ('Cumulative grid import in kWh ' ) ?> ",
178
178
'Display power as kW': "<?php echo _ ('Display power as kW ' ) ?> ",
179
+ 'Display solar power as 0 below this threshold in w': "<?php echo _ ('Display solar power as 0 below this threshold in w ' ) ?> ",
179
180
'PERFECT BALANCE': "<?php echo _ ('PERFECT BALANCE ' ) ?> ",
180
181
'EXPORTING': "<?php echo _ ('EXPORTING ' ) ?> ",
181
182
'IMPORTING': "<?php echo _ ('IMPORTING ' ) ?> ",
@@ -211,7 +212,8 @@ function getTranslations(){
211
212
"use_kwh":{"optional":true, "type":"feed", "autoname":"use_kwh", "description":_("Cumulative use in kWh")},
212
213
"solar_kwh":{"optional":true, "type":"feed", "autoname":"solar_kwh", "description":_("Cumulative solar generation in kWh")},
213
214
"import_kwh":{"optional":true, "type":"feed", "autoname":"import_kwh", "description":_("Cumulative grid import in kWh")},
214
- "kw":{"type":"checkbox", "default":0, "name": "Show kW", "description":_("Display power as kW")}
215
+ "kw":{"type":"checkbox", "default":0, "name": "Show kW", "description":_("Display power as kW")},
216
+ "solar_disp_min":{"type":"value", "default":10, "name": "Solar Threshold", "description":_("Display solar power as 0 below this threshold in w")}
215
217
//"import_unitcost":{"type":"value", "default":0.1508, "name": "Import unit cost", "description":"Unit cost of imported grid electricity"}
216
218
};
217
219
config.name = "<?php echo $ name ; ?> ";
@@ -434,7 +436,7 @@ function livefn()
434
436
view.start = now - live_timerange;
435
437
}
436
438
// Lower limit for solar
437
- if (solar_now<10 ) solar_now = 0;
439
+ if (solar_now<config.app.solar_disp_min.value ) solar_now = 0;
438
440
439
441
var balance = solar_now - use_now;
440
442
if (balance==0) {
@@ -537,7 +539,7 @@ function draw_powergraph() {
537
539
// -------------------------------------------------------------------------------------------------------
538
540
// Supply / demand balance calculation
539
541
// -------------------------------------------------------------------------------------------------------
540
- if (solar_now<10 ) solar_now = 0;
542
+ if (solar_now<config.app.solar_disp_min.value ) solar_now = 0;
541
543
var balance = solar_now - use_now;
542
544
543
545
if (balance>=0) total_use_direct_kwh += (use_now*interval)/(1000*3600);
0 commit comments