OH3: Controlling temperature setpoint from DSL rules

I am running OH3.1 on a NUC and use DSL rules.
My km200 (buderus heating) temperatures are setup as temperature:

Number:Temperature    Heat_HzSollDay      "Wunsch-Temperatur"                         <temperature>    (G_Num,G_Heat,gLivingHeating)     ["Setpoint", "Temperature"]       {channel="km200:heatingCircuit:659200271:hc1:temperatureLevels_day", alexa="ThermostatController.targetSetpoint" [scale="Celsius"]}

I used to control it in my rules:

Heat_HzSollDay.sendCommand(20)

However, I get:

2021-07-25 07:27:20.480 [WARN ] [0.internal.handler.KM200ThingHandler] - Unsupported Command: 20 °C Class: class org.openhab.core.library.types.QuantityType

First I thought it’s related to this issue, but it’s obviously about basicUI only:

I can control the temperature using Karaf:
openhab:update Heat_HzSollDay 20

EDIT:
These do not work in DSL rules:

Heat_HzSollDay.sendCommand(22 as Number)
Heat_HzSollDay.sendCommand(22|"°C")
Heat_HzSollDay.sendCommand(22.0)

Heat_HzSollDay.sendCommand(22 °C)
Heat_HzSollDay.sendCommand(22°C)

the first two return:
Unsupported Command: 22 °C Class: class org.openhab.core.library.types.QuantityType

the other two won’t load:

Configuration model 'heating.rules' has errors, therefore ignoring it: [96,29]: no viable alternative at input '°C'

You’ve managed to guess just about every combination that won’t work.

Try these -

myItem.sendCommand("22.5 °C")

x = 22.5
myItem.sendCommand( x.toString + " °C" )

q = 22.5 | °C
myItem.sendCommand( q )

:smiley: Thank you!

Unfortunately none of these work:

Unsupported Command: 22.5 °C Class: class org.openhab.core.library.types.QuantityType

So it’s complaining, that in any case it’s not QuantityType (Number?) but a string!?

I think we’re overlooking the important part of the message

It’s not the Number:Temperature Item complaining, that likes to be commanded “20 °C” and will pass it along to the binding.

Does KM200 binding actually support quantities, or have you linked a quantity Item to a regular number type channel? Docs are skimpy but no mention of quantities.

You are absolutely right.
I obviously did not see the wood from the trees… :wink:

I need to check this…

same problem here. if I remove UoM from the item (Number:Temperature) then it`s possible to control the temperature setpoint.
it seems the km200 binding needs to deal with regular numbers.
as a workaround I changed those items to Number items…