API to clear breath state when timed powered off activates?

I am using my lifx light as a weather alert.

When the alert is activated, I send it with;

  var url =
  var color = 'hue:299.54 saturation:1.0 brightness:0.37';
  var from_color = 'hue:299.54 saturation:1.0 brightness:0.01';
  // sec
  var period = 5;
  // set it to last 3 hours
  var cycles = (ALERT_RUN_HOURS * 60 * 60) / period;
  var persist = 'true';

  var request_data = {
    "color": color,
    "from_color": from_color,
    "period": period,
    "cycles": cycles,
    "persist": persist,
    "power_on": true,
    "peak": 0.4

I can’t get the cycles time right, so after this api is sent I just send a timed shutoff

  var url =

  var request_data = {
    "power": "off",
    "duration": duration

My question is, is it possible for me to clear out the breath effect in memory when the power: off state activates?

bump … if anyone can please let me know.

You could re-explain the issue you’re having? I don’t seem to understand it from reading your post. How would you clear the breathe effect in memory when you’re only making HTTP calls?