Hey community,
I got a problem with a rule.
import org.openhab.core.library.types.*
import org.openhab.core.persistence.*
import org.openhab.model.script.actions.*
import java.lang.Math
import java.util.Calendar
import java.util.Date
import java.util.TimeZone
import java.text.SimpleDateFormat
import org.openhab.action.squeezebox.*
import org.joda.time.*
rule "Heizung ON"
when
Item OG_TEMP_Esszimmer changed or
Item OG_Heizung_TimeStartMessage changed or
Item OG_Heizung_TimeEndMessage changed
then
var hour = now.getHourOfDay
var minute = now.getMinuteOfHour
var TEMP = OG_TEMP_Esszimmer.state as DecimalType
var int ACT_TIME = hour.intValue * 60 + minute.intValue
var int START_TIME = (OG_Heizung_Ein_TimeHour.state as DecimalType).intValue * 60 + (OG_Heizung_Ein_TimeMinute.state as DecimalType).intValue
var int END_TIME = (OG_Heizung_Aus_TimeHour.state as DecimalType).intValue * 60 + (OG_Heizung_Aus_TimeMinute.state as DecimalType).intValue
if (TEMP < OG_Heizung_Esszimmer.state as DecimalType) {
if ( ACT_TIME > START_TIME) && ( ACT_TIME < END_TIME) {
if ( MOB137 == ON) || ( MOB188 == ON) {
sendCommand(OG_Heizung, ON)
}
}
} else {
sendCommand(OG_Heizung, OFF)
}
end
the openhab.log give me only this information.
2016-12-09 21:44:33.495 [ERROR] [.script.engine.ScriptExecutionThread] - Rule 'Heizung ON': An error occured during the script execution: Unhandled parameter types: [null, org.eclipse.xtext.xbase.interpreter.impl.DefaultEvaluationContext@11d55b, org.eclipse.xtext.util.CancelIndicator$1@6df8d]
I figurate out its the “now.” variable
Could anyone of you tell me what I’m doing wrong.