diff --git a/config.schema.json b/config.schema.json index 94c0bea..424063d 100644 --- a/config.schema.json +++ b/config.schema.json @@ -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, diff --git a/package.json b/package.json index f16d314..066f722 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/functions.ts b/src/functions.ts index 7e87de8..a796a57 100644 --- a/src/functions.ts +++ b/src/functions.ts @@ -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) {