Skip to content

Commit

Permalink
fix: 🐛 decimal values not in individual
Browse files Browse the repository at this point in the history
  • Loading branch information
flixlix committed Apr 21, 2024
1 parent 91d9494 commit 9884863
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/power-flow-card-plus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -481,14 +481,13 @@ export class PowerFlowCardPlus extends LitElement {
},
};

/* return source object with largest value property */
const homeLargestSource = Object.keys(homeSources).reduce((a, b) => (homeSources[a].value > homeSources[b].value ? a : b));

const getIndividualDisplayState = (field?: IndividualObject) => {
if (!field) return "";
if (field?.state === undefined) return "";
// return displayValue(this.hass, field?.state, field?.unit, field?.unit_white_space, field?.decimals);
return displayValue(this.hass, this._config, field?.state, {
decimals: field?.decimals,
unit: field?.unit,
unitWhiteSpace: field?.unit_white_space,
watt_threshold: this._config.watt_threshold,
Expand Down

0 comments on commit 9884863

Please sign in to comment.