This is probably what is causing the issue, but it is not obvious to me how to accomodate a Number when the device needs to know the units. I think the item-type needs to match the channel-type
tl;dr == The zwave thermostat_setpoint channel is defined as a Number:Temperature. The Zwave protocol for this command class includes the scale (F or C) with the value so the device is sending or receiving a QuantityType
<!-- Heating Setpoint Channel -->
<channel-type id="thermostat_setpoint">
<item-type>Number:Temperature</item-type>
<label>Heating Setpoint</label>
<description>Sets the thermostat setpoint</description>
<category>Heating</category>
Prior to OH4 (the Zwave code hasn’t changed here), the ThingHandler tried to accommodate users that linked a number item to a Number:Temperature channel by changing it to a Quantity, I believe with this section of code;
Class<? extends State> targetStateClass = channelDataType.getTypeClass().asSubclass(State.class);
State convertedState = ((State) command).as(targetStateClass);
if (convertedState == null) {
logger.debug("NODE {}: Received commands datatype {} couldn't be converted to channels datatype {}", nodeId,
dataType, channelDataType);
return null;
}
My guess is OH4 eliminated the subclass of Number under Number:Temperature and now the converted state returns null and triggers the log entry;
2024-11-29 11:58:33.518 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 35: Received commands datatype DecimalType couldn't be converted to channels datatype QuantityType
The overall code that includes the above subroutine is
// first try to get a channel by the expected datatype
ZWaveThingChannel cmdChannel = cmdChannels.get(dataType);
if (cmdChannel == null && !cmdChannels.isEmpty()) {
// nothing by expected datatype found, try to find one where the datatype can be converted to
for (ZWaveThingChannel channel : cmdChannels.values()) {
command = convertCommandToDataType(channelUID, channel.getDataType(), command, dataType);
if (command != null) {
cmdChannel = channel;
logger.debug("NODE {}: Received command {} was converted --> {} [{}]", nodeId, channelUID, command,
command.getClass().getSimpleName());
break;
}
}
}
if (cmdChannel == null) {
logger.debug("NODE {}: Command for unknown channel {} with {}", nodeId, channelUID, dataType);
return;
}
This checks for dataType (in this case Number:temperature), then tries the subroutine that used to accept Number, then logs that there is no channel for Number.
2024-11-29 11:58:33.519 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 35: Command for unknown channel zwave:device:d5fd2f9335:node35:thermostat_setpoint_heating1 with DecimalType