I’m a bit confused Here the snipet:
Number brightness4 "Auto Einfahrt [%d]" (gBrightness) {homematic="address=MEQxxxxxxxx, channel=1, parameter=BRIGHTNESS" }
The inside a rule:
logInfo("Sunset","Front brightness changed to: {}. Lamps are {}. laststate was {}" , brightness4.state, switchGarden3.state, brightness4.maximumSince(now.minusMinutes(15)))
Output:
20:38:35.915 [INFO ] [rg.openhab.model.script.Sunset:53 ] - Front brightness changed to: 109. Lamps are OFF. laststate was Aug 18, 2015 8:32:00 PM: brightness4 -> 125
Instead of the value 125 itself, which I want to use in an IF clause I got a timestamp and the value. Any Idea wahts wrong?
The IF clause creates the following type error.
if (brightness4.state < 120 && switchGarden3.state == OFF && brightness4.maximumSince(now.minusMinutes(15)) >= 120) {
20:43:22.241 [ERROR] [o.o.c.s.ScriptExecutionThread :50 ] - Error during the execution of rule ‘Front lamp on depend on brightness (einfahrt)’: The name ‘ >= ’ cannot be resolved to an item or type.