Skip to content

Commit

Permalink
build(deps-dev): bump @biomejs/biome from 1.2.2 to 1.3.0 (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
dependabot[bot] authored Oct 20, 2023
1 parent 8dd7bf7 commit 4e00f21
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 33 deletions.
60 changes: 32 additions & 28 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"husky": "^8.0.3",
"lint-staged": "^15.0.1",
"prettier": "^3.0.0",
"@biomejs/biome": "1.2.2",
"@biomejs/biome": "1.3.0",
"semantic-release": "^22.0.0"
},
"dependencies": {
Expand Down
8 changes: 4 additions & 4 deletions src/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -102,18 +102,18 @@ const setReadings = (data) => {
const readingDate = new Date();
readingDate.setMinutes(0, 0, 0);

typeMap.forEach((type) => {
for (const type of typeMap) {
if (data[type[0]]) {
const value = (readingOffset + data[type[0]]).toFixed(4);
readings.push(new Reading(type, readingDate.toISOString(), value));
}
});
}
return readings;
};

const sendReadings = (readings, dryRun) => {
console.log(dryRun ? "Printing readings to console..." : "Sending readings to EnergyId Webhook...");
readings.forEach((reading) => {
for (const reading of readings) {
if (dryRun) {
console.log(`Reading to send: ${reading.json()}`);
return;
Expand All @@ -135,7 +135,7 @@ const sendReadings = (readings, dryRun) => {
.catch((e) => {
console.error(e.message);
});
});
}
};

/**
Expand Down

0 comments on commit 4e00f21

Please sign in to comment.