"Cannot assign a value in null context" - problem with DateTime


(Michal Szymanski) #1

In item file I have:

DateTime WtrLastDate "Data ostatniego podlewania [%1$ta %1$tR]" <calendar> (Wtr)

and in a rule:

sendCommand(WtrLastDate,now)

and during execution I’ve got:
201710-07 14:18:02.962 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Error during the execution of startup rule 'Watering_garden_startup': Cannot assign a value in null context.

What is wrong with rule?

MIchal


(Udo Hartmann) #2

… Please, whenever possible use the method rather than the action:

WtrLastDate.sendCommand(now)