Skip to content

Commit

Permalink
Merge pull request #587 from flixlix/585-decimal-values-is-not-presen…
Browse files Browse the repository at this point in the history
…ted-in-individual

fix: 🐛 decimal values not in individual
  • Loading branch information
flixlix authored Apr 21, 2024
2 parents 4c81aed + 9884863 commit 4a54417
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 4a54417

Please sign in to comment.