Openhab 4 - change state if item is greated than

dear community,

what is the best way for doing that?

I have in my room a temperature sensor.

and i have a infrared panel.

i want set when temperature is smaller than 20 °, then then the infrared panel will so long powered on until the temperature is greater than 22 °.

how is the best way do to that in openhab?
maybe any examples for that?

thank you so much

many greets

“Best” is completely subjective.

Simplest would be to create a UI rule.

  1. triggers based on changes to the temperature sensor Item.
  2. action commands the heater to ON
  3. condition (but only if) tests that the temperature is < 20 °C (I’m assuming units are in use)

Second rule is the same except the heater is commanded to OFF in 2 and the condition tests that the temperature is > 22 °C.

Other options include writing the two rules above into a single rule using Script Actions, using the hysteresis profile, etc.

Thank you so much for your help.

It works fine, i have used the Rules with Designer.

Thank you!