OHv2 on rPi3
I am trying to get the minutes via modulo using the “%” sign.
It throws an error:
2021-10-18 06:00:00.012 [ERROR] [ntime.internal.engine.ExecuteRuleJob] - Error during the execution of rule 'SLO window blind non-astro time ON': Unknown variable or command '%'; line 67, column 33, length 6
in this rule:
rule "SLO window blind non-astro time ON"
when
// s m h D M DoW Y
Time cron "0 0/5 5-7 * * ? *"
// here: every 5 minutes between 5 and 7; use http://www.cronmaker.com/
then
if (Shed_SLO_Blind_NonAstro.state == ON)
{
var Number i = (Shed_SLO_TimeSetter.state as DecimalType).intValue()
var Number h = (i / 60)
if (h == now.getHourOfDay())
{
var Number m = (i % 60)
if (m == now.getMinuteOfHour())
{
TX433_Blind_SLO_Up.sendCommand(ON)
}
}
}
end
… with the line number pointing to this line:
var Number m = (i % 60)
… which VScode also red lined.
This post claims it should work:
Any hints appreciated.