lx_delta: Change light state relative to current state (wrapper for...

Description Usage Arguments Value References

View source: R/state.R

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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


lifx documentation built on July 1, 2020, 6:08 p.m.