Thermostat setting fails in script, but only sometimes

I use a morning script that, among other things, turns the heat up. Lately it has been throwing this error:

Error: Unable to set value 12-64-0-mode: unknown_error: TypeError: resp.toSupervisionResult is not a function at Driver.sendSupervisedCommand (file:///usr/src/node_modules/zwave-js/src/lib/driver/Driver.ts:7372:15) at Driver.sendCommand (file:///usr/src/node_modules/zwave-js/src/lib/driver/Driver.ts:7413:19) at Proxy. (file:///usr/src/node_modules/@zwave-js/cc/src/cc/ThermostatModeCC.ts:100:19) at ZWaveNode.setValue (file:///usr/src/node_modules/zwave-js/src/lib/node/Node.ts:557:19) at NodeMessageHandler.handle (file:///usr/src/node_modules/@zwave-js/server/dist-esm/lib/node/message_handler.js:23:32) at Client.receiveMessage (file:///usr/src/node_modules/@zwave-js/server/dist-esm/lib/server.js:134:62)

Here is the YAML for the script step that fails:

action: climate.set_temperature
metadata: {}
data:
hvac_mode: heat
temperature: 68
target:
device_id: 09152ed541bbb3d481d5ed016696e600

The odd thing is, if I execute the step manually from the script page, it works every time. Executing the entire script manually also works, from the script page or by voice command. It only fails on the first attempt of the day, early in the morning. The thermostat is in heat mode with a set point of 62 at night.

The thermostat is a Honeywell TH6320ZW connected by z-wave. All software is the latest version.

Thank you

The documentation for climate.set_temperature does not have device_id in there. It has entity_id.

Which version of Z-Wave JS are you using? This problem (or one like it) is supposedly fixed in v15.7.0. https://github.com/zwave-js/zwave-js/pull/8437.

If that was the problem, it wouldn’t work at all, would it?

ZwaveJS 15.15.0. server version 3.4.0

Yeah. I’d think you are correct.

But, my automation uses entity_id and has never not worked. A different device than you have, but it is Z-Wave. I am using Z-Wave JS UI. But just switched from Z-Wave JS less than a month ago.

I have a different Honeywell thermostat and occasionally a call to set the temperature fails. I use the Retry custom integration to work around the issue.

Here is a snip of the log file:

2025-12-02 06:57:06.227 DRIVER » [Node 012] [REQ] [SendDataBridge]
│ source node id: 1
│ transmit options: 0x25
│ callback id: 59
└─[Security2CCMessageEncapsulation]
│ sequence number: 147
└─[SupervisionCCGet]
│ session id: 42
│ request updates: true
└─[ThermostatModeCCSet]
mode: Heat
2025-12-02 06:57:06.230 SERIAL » 0x012100a90001000c139f0393000dccf342424522ebe6c6cda1ba479f250000000 (35 bytes)
03be8
2025-12-02 06:57:06.239 SERIAL « [ACK] (0x06)
2025-12-02 06:57:06.240 SERIAL « 0x010401a90152 (6 bytes)
2025-12-02 06:57:06.241 SERIAL » [ACK] (0x06)
2025-12-02 06:57:06.241 DRIVER « [RES] [SendDataBridge]
was sent: true
2025-12-02 06:57:07.476 SERIAL « 0x011d00a8000001000b0f9f037600e0800dd70261d81e9fdfaf00b4007f7fe1 (31 bytes)
2025-12-02 06:57:07.480 SERIAL » [ACK] (0x06)
2025-12-02 06:57:07.481 CNTRLR [Node 011] [~] [Thermostat Fan State] state: 0 => 0 [Endpoint 0]
2025-12-02 06:57:07.481 DRIVER « [Node 011] [REQ] [BridgeApplicationCommand]
│ RSSI: -76 dBm
└─[Security2CCMessageEncapsulation]
│ sequence number: 118
│ security class: S2_Unauthenticated
└─[ThermostatFanStateCCReport]
state: Idle / off
2025-12-02 06:57:07.493 SERIAL « 0x012200a8000001000c149f02680192a066a58aa6060f029e26a274e2829f00ac0 (36 bytes)
07f7f73
2025-12-02 06:57:07.495 SERIAL » [ACK] (0x06)
2025-12-02 06:57:07.496 DRIVER « [Node 012] [REQ] [BridgeApplicationCommand]
│ RSSI: -84 dBm
└─[Security2CCNonceReport]
sequence number: 104
SOS: true
MOS: false
receiver entropy: 0x92a066a58aa6060f029e26a274e2829f
2025-12-02 06:57:07.497 CNTRLR « [Node 012] received expected response prematurely, aborting transaction…
2025-12-02 06:57:07.498 SERIAL » 0x01030016ea (5 bytes)
2025-12-02 06:57:07.499 DRIVER » [REQ] [SendDataAbort]
2025-12-02 06:57:07.502 SERIAL « [ACK]