lx_effect_pulse {lifx}R Documentation

"Pulse" effect

Description

"Pulse" effect

Usage

lx_effect_pulse(
  color,
  from_color = NULL,
  period = 1,
  cycles = 1,
  persist = FALSE,
  power_on = TRUE,
  selector = "all",
  token = lx_get_token()
)

Arguments

color

The color to use for the pulse effect. use lx_color() as input

from_color

The color to start the effect from. If this parameter is omitted then the color the bulb is currently set to is used instead.

period

The time in seconds for one cycle of the effect.

cycles

The number of times to repeat the effect.

persist

boolean; If FALSE set the light back to its previous value when effect ends, if true leave the last effect color.

power_on

If FALSE, does not turn light on if it is off

selector

'LIFX' api "selector" such as "all", "id:12345", or "location:kitchen". Can be created with lx_selector or written manually (see https://api.developer.lifx.com/docs/selectors

token

API token (see ?lx_save_token). If left empty, the token is retrieved from the environmental variable if available. (see lx_save_token)

Value

an 'httr' response object (see response)

Examples

## Not run: 
lx_effect_pulse(color = "red",from_color = "blue", period = 3,cycles = 5, persist = TRUE)

## End(Not run)

[Package lifx version 0.2.0 Index]