Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

lastvalue instead of highest

Vincent67a5602c5c1e
diff --git a/ui/component/or-attribute-card/src/index.ts b/ui/component/or-attribute-card/src/index.ts
index 74adcf87d..c746c1217 100644
--- a/ui/component/or-attribute-card/src/index.ts
+++ b/ui/component/or-attribute-card/src/index.ts
@@ -621,7 +621,7 @@ export class OrAttributeCard extends LitElement {
.then((datapoints: ValueDatapoint<any>[]) => {
this.data = datapoints || [];
this.delta = this.getFormattedDelta(this.getFirstKnownMeasurement(this.data), this.getLastKnownMeasurement(this.data));
- this.mainValue = this.getHighestValue(this.data);
+ this.mainValue = this.getLastKnownMeasurement(this.data);
this.formattedMainValue = this.getFormattedValue(this.mainValue);
this.error = false;