From d9cbf2916e29a53c33494e429d3156a2cca1bfbf Mon Sep 17 00:00:00 2001 From: Todd Hendricks Date: Wed, 3 Jan 2024 19:27:48 -0600 Subject: [PATCH] Fix unit conversion --- drivers/refrigeration/device.js | 4 ++-- drivers/stDevice/device.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/refrigeration/device.js b/drivers/refrigeration/device.js index 4cc6b3b..bbaaa12 100644 --- a/drivers/refrigeration/device.js +++ b/drivers/refrigeration/device.js @@ -301,9 +301,9 @@ class FridgeDevice extends Homey.Device units = units[ mapEntry.dataEntry[ i ] ]; } - if (units.units) + if (units.unit) { - if (units.units === 'F') + if (units.unit === 'F') { // Convert to C value = (value - 32) / 1.8; diff --git a/drivers/stDevice/device.js b/drivers/stDevice/device.js index 79b1dbb..1ccd14e 100644 --- a/drivers/stDevice/device.js +++ b/drivers/stDevice/device.js @@ -451,9 +451,9 @@ class STDevice extends Homey.Device units = units[ mapEntry.dataEntry[ i ] ]; } - if (units.units) + if (units.unit) { - if (units.units === 'F') + if (units.unit === 'F') { // Convert to C value = (value - 32) / 1.8; -- 2.39.3 (Apple Git-145)