Number TargetTemp "Temperatura [%.1f °C]"
Switch TargetTempButton "Ust. temp."
and also I added it to my sitemap
Switch item=TargetTempButton label="Ust. temp." mappings=[1="PLUS", 2="MINUS"]
Text item=TargetTemp
and I added this rule
rule "TargetTemp plus/minus."
when
Item TargetTempButton received command
then
if (receivedCommand == 1) {
TargetTemp = TargetTemp + 1
}
if (receivedCommand == 2) {
TargetTemp = TargetTemp - 1
}
end
The idea is to control temperature in home and when I push plus button it should add 1 degree to TargetTemp (Text item) but unfortunately when i push plus button I receive unknown command ‘1’ for item 'TargetTempButton’
I’m beginner and I don’t know what should I do next
what you’re looking for is actually a SetPoint. This control automatically gives you the + and - controls as well as handling the value produced by them.
That is a very, very brief explanation of the control. I’d suggest you take a look at some of the thermostat bindings for more practical examples. If you get stuck, let me know.