Need help with rule (Velux windows controlled from outside temp, alarm and Lumiance), now optimizing

Sorry for jumping abit around here… But I dont see the logic exactly…

What is “target” in this? Is it at static variable in openhab??

Look at the line you just asked about.

val target = aNest_TargetTemp.state as Number

It’s the thermostat’s target temperature.

Those six lines of code you quoted is just a small part of the overall Rule. You have to look at the whole Rule.

Ahh, thats one of the missing pieces in my pussle… It´s the setpoint of the thermostat. Makes sense now.
One down, a few more pieces to go, I hope…

Or did I get it wrong?.. target is suppose to be the actual temperature and not the setpoint of the thermostat? In my rule, should it be the temperature of the livingroom?

I would suspect target beeing a static setpoint. Ie… if it´s too hot inside then open the window… (simple logic to start with).
But too hot doesnt mean the same as the thermostat setpoint. Too hot is suppose to be something like thermostat setpoint + xx degrees, right?

Target is the temperature I want the house to be. If it gets too cold the heater turns on.

The actual temperatures are represented by the upper and lower variables.

If that’s what you want. It’s all up to you. For us, we want to keep the house as close to 67 degrees F as possible. If the upper floors are warmer than that, warmer than the basement, and it is warm enough outside, turn on the fan.

For us, too hot does mean the same thing as the thermostat setpoint.

Okay, target is the setpoint then, in your case, (which is what I´m trying to adapt) :slight_smile: