[SOLVED] Question how to set the temperature using the tado binding

Hi!
I am pretty new to openhab, I got it running, but I am stuck in a, I assume, pretty easy to solve problem.
I want to set the target temperature of a zone to a certain value. The tado binding is making use of Number:Temperature and I have no clue of how to use it correctly. I searched in the forum and tried different annotations, but all of them resulted in cast or conversion errors.
All I want to do ist something like:

Wohnzimmer_TargetTemperature.sendCommand(qt) where qt is the desired temperature.

Anyone out there willing to give some help to a noob?
Thank you!

How did you create your Items that are bound to the tado binding? (via PaperUI or *.items file)?

Did you try to use a Setpoint element in your sitemap to set the temperature?

I activated the tado binding in PaperUI and created the items in PaperUI as well. I havent used the sitemap so far, I just started scripting in a.rules file. Turning the heating off if a window opens already works.
What will happen if I create a .sitmap file and a .items file and still having the configuration inside PaperUI?

nothing bad as long as you don’t use the same Item names for the manually created Items :slight_smile:

You can have multiple Items (with unique names) linked to the same Thing’s Channel. One Item from PaperUI, another one from an *.items file. Both will get updated when the Channel gets updates from the binding.

How do you declare the qt variable in your rule? Can you post the entire rule? (and the log entry with the cast error)

Well… while talking to you I played around and now I found the solution :smiley:
Thank you for your support, I think it somehow was leading me on the right track. Here ist the code of the working rule:

rule “testrule”
when
Item Wohnzimmer_ZoneOperationMode received update
then
var Number awayTemp = new QuantityType(16.5 + “°C”)
if ((Wohnzimmer_ZoneOperationMode.state != “MANUAL”))
{
Wohnzimmer_TargetTemperature.sendCommand(awayTemp)
Wohnzimmer_ZoneOperationMode.sendCommand(“MANUAL”)
}
end

2 Likes