Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In the example below, we are using the time block to extract just current time from the now block. Then we are using time subtract blocks to determine if the current time is either 15 minutes before sunset (or less) or 15 minutes after sunrise (or less).  If either of these conditions are true, then we set the Parking Lot Lights to on. In our example below, current time is 20:17 and sunset time is 20:29. Because the difference is less than 15 minutes, the lights are set on.

...