Skip to content

Commit

Permalink
Minor fixes and updates
Browse files Browse the repository at this point in the history
  • Loading branch information
msegzda committed Apr 11, 2024
1 parent 42b5c9f commit c105c3d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
},
"minPriciestMargin": {
"title": "Minimum Price Threshold for Priciest Hour(s)",
"description": "The minimum hour price (in cents) for inclusion in the calculation of the `Nordpool_priciestHour`. Default 0 (cents).",
"description": "Hours below this price will not be included into 'priciest hours(s)' calculation. Default 0 cents.",
"required": false,
"default": 0,
"minimum": 0,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"displayName": "Homebridge Nordpool LT, LV, EE, FI",
"name": "homebridge-nordpool-baltics",
"version": "1.3.1",
"version": "1.3.2",
"private": false,
"description": "Plugin exposes virtual accessories (switch, light, presence sensors) and enables HomeKit automation by Nordpool electricity pricing in supported countries.",
"homepage": "https://github.com/msegzda/homebridge-nordpool-baltics",
Expand Down
7 changes: 6 additions & 1 deletion src/functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,12 @@ export class Functions {
}
}

this.platform.log.info(`Most expensive hour(s): ${this.pricing.priciestHour.join(', ')}`);
if (this.pricing.priciestHour.length === 0) {
this.platform.log.info(`Most expensive hour(s): N/A (all hours prices fall below ${this.minPriciestMargin} cents)`);
} else {
this.platform.log.info(`Most expensive hour(s): ${this.pricing.priciestHour.join(', ')}`);
}

this.platform.log.info(`Median price today: ${this.pricing.median} cents`);

if (this.plotTheChart) {
Expand Down

0 comments on commit c105c3d

Please sign in to comment.