-1

Lamps in my living rooms switch on 15 minutes before sunset (by making use of a rule and the daylight sensor in the bridge). However I want also that the lamps in the garden switch on but 15 minutes AFTER sunset. There is only one sensor for daylight, so question is if (and how) I could use a (new) rule, which will switch the garden lights on 30 minutes later than the living lamps (which is equal to 15 minutes after sunset).

tk421
  • 5,775
  • 6
  • 23
  • 34
ni_hao
  • 404
  • 2
  • 5
  • 16

1 Answers1

0

You can create a schedule timer that expires after 30 minutes and turns on your living lamps. Make sure the "status" of the schedule is initially disabled and that "autodelete" is false. See the hue API for more details about creating schedules (registration required)

In the rule that turns on your garden lights add an additional action that enables the schedule. When the schedule timer expires the lights will go on and the schedule will be disabled again.

The schedule would look something like this (update the command for your situation, the example below turns on all lights):

{
    "autodelete": false,
    "status": "disabled",
    "localtime": "PT00:30:00",
    "name": "Sunset timer",
    "command": {
        "method": "PUT",
        "address": "/api/<your api user>/groups/0/action",
        "body": {"on": true}
    }
}

The action to start the schedule would be:

{
    "address": "/schedules/<your schedule id>",
    "method": "PUT",
    "body": {"status": "enabled"}
}
Michel
  • 166
  • 5