diff --git a/dist/chart.js b/dist/chart.js index d02649e..1605719 100644 --- a/dist/chart.js +++ b/dist/chart.js @@ -265,8 +265,8 @@ export const chart = { } else { vpd = this.calculateVPD(leafTemperature, temperature, humidity).toFixed(2); } - const min_vpd = this.calculateVPD(temperature - 2, temperature, this.max_humidity); - const max_vpd = this.calculateVPD(temperature - 2, temperature, this.min_humidity); + const min_vpd = this.calculateVPD(temperature - (this.config.leaf_temperature_offset || 2), temperature, this.max_humidity); + const max_vpd = this.calculateVPD(temperature - (this.config.leaf_temperature_offset || 2), temperature, this.min_humidity); const relativeVpd = vpd - min_vpd; const totalVpdRange = max_vpd - min_vpd; const percentageVpd = (relativeVpd / totalVpdRange) * 100; @@ -274,7 +274,7 @@ export const chart = { const relativeTemperature = temperature - this.min_temperature; const totalTemperatureRange = this.max_temperature - this.min_temperature; const percentageTemperature = (relativeTemperature / totalTemperatureRange) * 100; - + const pointerElements = this.createPointer(index, percentageVpd, percentageTemperature, sensor.name, vpd, humidity, temperature); // Check and append only if elements are Nodes diff --git a/dist/ha-vpd-chart.js b/dist/ha-vpd-chart.js index 9cf7218..eef3c01 100644 --- a/dist/ha-vpd-chart.js +++ b/dist/ha-vpd-chart.js @@ -1,5 +1,5 @@ // Set version for the card -window.vpdChartVersion = "1.3.6"; +window.vpdChartVersion = "1.3.7"; import {methods} from './methods.js'; import {chart} from './chart.js';