Skip to content

Commit

Permalink
Merge pull request #91 from Olen/debugbars
Browse files Browse the repository at this point in the history
Add types 4
  • Loading branch information
Olen authored Jan 3, 2024
2 parents 0058887 + d43fe8e commit 73f8aab
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/utils/attributes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ export const renderAttributes = (card: FlowerCard): TemplateResult[] => {
const result = card.plantinfo.result;
for (const elem of monitored) {
if (result[elem]) {
const { mmax, mmin, current, icon, sensor, unit_of_measurement } = result[elem];
const max = Number(mmax);
const min = Number(mmin);
limits[`max_${elem}`] = { max, min };
const { max, min, current, icon, sensor, unit_of_measurement } = result[elem];
const nmax = Number(max);
const nmin = Number(min);
limits[`max_${elem}`] = { nmax, nmin };
curr[elem] = Number(current);
icons[elem] = icon;
sensors[elem] = sensor;
Expand Down

0 comments on commit 73f8aab

Please # to comment.