From dc845b2a2dafac9310df0d894c34bb573513c2d4 Mon Sep 17 00:00:00 2001 From: jtricerolph Date: Thu, 1 Oct 2026 12:17:43 +0000 Subject: [PATCH] Fix NaN target temp for native Daikin splits MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Daikin's local API returns stemp as the placeholder string '-' in some states, which Number() turns into NaN instead of null/undefined. That NaN wasn't caught by the downstream ?? null checks, so it got written into current_target_temp and device_readings.target_temp as a literal NaN, then rendered as "NaN°C" on the dashboard and zone popup. Guard stemp the same way roomTemp's htemp is already guarded. Co-Authored-By: Claude Sonnet 5 --- backend/src/lib/drivers/daikin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/lib/drivers/daikin.js b/backend/src/lib/drivers/daikin.js index 9e34084..1aca672 100644 --- a/backend/src/lib/drivers/daikin.js +++ b/backend/src/lib/drivers/daikin.js @@ -187,7 +187,7 @@ export async function getStatus(externalRef) { external_ref: externalRef, onOff: control.pow === '1' ? 'on' : 'off', mode: DAIKIN_TO_MODE[control.mode] ?? 'auto', - setpoint: control.stemp != null ? Number(control.stemp) : undefined, + setpoint: control.stemp != null && control.stemp !== '-' ? Number(control.stemp) : undefined, fanSpeed: DAIKIN_TO_FAN[control.f_rate] ?? 'auto', roomTemp: sensor.htemp != null && sensor.htemp !== '-' ? Number(sensor.htemp) : undefined, }