Fix NaN target temp for native Daikin splits
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 <noreply@anthropic.com>
This commit is contained in:
parent
0f64500813
commit
dc845b2a2d
1 changed files with 1 additions and 1 deletions
|
|
@ -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,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue