From koffienl
Create a timer device:
{
"resolution": 60,
"xLink": "",
"id": "daytimer",
"name": "DayTimer",
"class": "Timer"
},
A resolution of 60 means you want to update every 60 seconds (think of your DB!).
You can start and stop the timer in rules, and use the count:
IF lamp is off THEN stop daytimer
IF time of daytimer >= 300 THEN log "timer is 5 minutes!" and stop daytimer and reset daytimer