Skip to content

Commit

Permalink
Merge pull request #92 from Olen/debugbars
Browse files Browse the repository at this point in the history
Cast to number
  • Loading branch information
Olen authored Jan 3, 2024
2 parents 9561767 + 964c86c commit 00ce136
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/utils/attributes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ export const renderAttributes = (card: FlowerCard): TemplateResult[] => {
const result = card.plantinfo.result;
for (const elem of monitored) {
if (result[elem]) {
const { max, min, current, icon, sensor, unit_of_measurement } = result[elem];
const nmax = Number(max);
const nmin = Number(min);
let { max, min, current, icon, sensor, unit_of_measurement } = result[elem];
max = Number(max);
min = Number(min);
limits[`max_${elem}`] = { nmax, nmin };
curr[elem] = Number(current);
icons[elem] = icon;
Expand Down

0 comments on commit 00ce136

Please # to comment.