lx_delta {lifx}R Documentation

Change light state relative to current state (wrapper for POST state delta

Description

Change light state relative to current state (wrapper for POST state delta

Usage

lx_delta(
  hue = NULL,
  saturation = NULL,
  brightness = NULL,
  kelvin = NULL,
  infrared = NULL,
  duration = 0,
  power = NULL,
  selector = "all",
  token = lx_get_token()
)

Arguments

hue

set the hue (0-255)

saturation

set the saturation (0-1)

brightness

set the brightness (0-1)

kelvin

set the color temperature. limits depend on the specific lamp; limits are likely in the range of 2500-9000

infrared

infrared brightness (0-1)

duration

in seconds, how long to perform the transition

power

string - if set to "on", turns the light on, if set to "off" turns it 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)

References

https://api.developer.lifx.com/docs/state-delta


[Package lifx version 0.2.0 Index]