+
-
Verbrauch
{{ powerConsumption?.formatted }}
+
-
Bezug
{{ powerPurchasePercent?.formatted }}
{{ powerPurchase?.formatted }}
+
-
Produktion
{{ powerProducedPercent?.formatted }}
{{ powerProduced?.formatted }}
+
-
Eigenverbrauch
{{ powerSelfPercent?.formatted }}
{{ powerSelf?.formatted }}
+
Einspeisung
{{ powerDeliveryPercent?.formatted }}
{{ powerDelivery?.formatted }}
@@ -55,27 +55,27 @@
-
+
-
Verbrauch
{{ aggregations.energyConsumed?.formatted }}
+
-
Bezug
{{ aggregations.energyPurchasedPercent?.formatted }}
{{ aggregations.energyPurchased?.delta?.formatted }}
+
-
Produktion
{{ aggregations.energyProducedPercent?.formatted }}
{{ aggregations.energyProduced?.delta?.formatted }}
+
-
Eigenverbrauch
{{ aggregations.energySelfPercent?.formatted }}
{{ aggregations.energySelf?.formatted }}
+
Eingespeist
{{ aggregations.energyDeliveredPercent?.formatted }}
{{ aggregations.energyDelivered?.delta?.formatted }}
diff --git a/src/main/angular/src/app/app.component.less b/src/main/angular/src/app/app.component.less
index a4733bf..adf0d31 100644
--- a/src/main/angular/src/app/app.component.less
+++ b/src/main/angular/src/app/app.component.less
@@ -80,3 +80,7 @@
.delivery {
color: magenta;
}
+
+.zero {
+ filter: opacity(30%);
+}
diff --git a/src/main/angular/src/app/series/series.service.ts b/src/main/angular/src/app/series/series.service.ts
index 6b61b1a..fb0b555 100644
--- a/src/main/angular/src/app/series/series.service.ts
+++ b/src/main/angular/src/app/series/series.service.ts
@@ -60,10 +60,8 @@ export class SeriesService {
this.subs.push(this.api.subscribe(['Series'], Series.fromJson, series => this.update(series)));
this.subs.push(this.api.subscribeConnection(connected => {
if (connected) {
- console.log("connected");
this.all();
} else {
- console.log("disconnected");
this.liveValues.forEach(liveValue => liveValue.series = null);
}
}));
diff --git a/src/main/angular/src/app/value/Value.ts b/src/main/angular/src/app/value/Value.ts
index 8d1b056..c90a189 100644
--- a/src/main/angular/src/app/value/Value.ts
+++ b/src/main/angular/src/app/value/Value.ts
@@ -22,6 +22,10 @@ export class Value {
);
}
+ get zero(): boolean {
+ return this.value === 0;
+ }
+
get formatted(): string {
return `${this.value.toFixed(this.decimals)} ${this.unit.unit}`;
}
@@ -59,7 +63,7 @@ export class Value {
}
percent(other: Value | undefined): Value | undefined {
- if (!other) {
+ if (!other || other.value === 0) {
return undefined;
}
return new Value(this.value / other.value * 100, Unit.PERCENT, 0);