I’m trying to create a script that should trigger a relayA (command.on).
But this relayA should not be triggered if relayB has ran during fe the last hour.
In normal cases, this should never be happening, but I want to build in a kind of safety in…
rule "relay rule"
when
Item relayA_proxy received command ON
then
if(relayB.lastUpdate.isBefore(now.minusHours(1))) relayA.sendCommand(ON)
end
The isBefore part is probably wrong but you get the idea. Look at the transform posting or section of the docs for the details if the above won’t work.