Slider for temperature control what is needed?

Hey there,

i unterstand that a slider sends a percentage value to a device.

Is it possible somehow to change it, so that it sends normal numbers?
A solution could be that every time when the slider is moved a rule translates the slider percentage in the right number. But in this case the slider percentage would be sent to the device and I do not know what the device says if there is sent “100” for example. The rule would have to act before the value is sent to the device.

Could anybody help me?

Greetings
Dominic

Hi,

actually a slider does send Normal numbers. I guess your problem is that for temperatur control, 0 to 100 is over (and under) the top. You could use a setpoint instead. For setpoints, you can define a min and max value sent. Like so:
Item:

Number Temp_Value    "Set Temp. [%s]"  

Sitemap:

Setpoint item=Temp_Value    minValue=15 maxValue=30 step=1

Downside is that it’s not a slider, but it saves the hassle of a complicated rule.
HTH,
-OLI

Hi Oli,

thank you for replying. You´re right the easiest way would be a setpoint but in my case the WAF wins and my wife likes slider much more than up and down buttons.

Do you have a link or hint for me how the rule has to be? And at what time is the rule triggered before or after the slider sends the 90 degrees ( :slight_smile: ) to the device?

Greetings
Dominic

Yeah guess you can’t argue against the WAF :smile:
I would say you need a slider not connected to your device. If the slider is moved, you first need to calculate the right value, then send that to the device via sendCommand. Math is not really my friend…but you’d need some kind of formular where 0=15, 100=30 so 50=22,5

something like:

rule "set temp"
when
       Item Temp_Slider changed
then
      Var TempToSend= //insert math for conversion of Temp_Slider.state.toInt
      SendCommand(Temp_Device,TempToSend)
end

Cheers,
-OLI