[Rules API] How to execute an action every 3hs

Hi Guys,

In my process to migrate my Pistons from WebCore to Rule API, I would like to run my A/C every 3hs (if I am at home). I was looking at the every/specific.

"every": {
   "specific": {
         "reference": "Noon",
         "offset": {
             "value": {
                 "integer": -65
             },
             "unit": "Minute"
         }
   },
  "actions": [
       Turn On A/C
       Wait (15min)
       Turn Off A/C
       }
   ]
}

But this seems to run once a day… As a workaround, I could create 8 different rules, but I don’t think this is optimal. Does anyone know how I could accomplish this?

Thanks!
Diego

Instead of specific use interval. In YAML it would be …

every:
  interval:
    value:
      integer: 3
    unit: Hour
  actions:

… but check because I’m awake a bit early.

Obviously that doesn’t give you a choice of which three hour intervals.

3 Likes

@orangebucket It just worked!

I owe you a coffee now!

Thanks a lot!

1 Like