lx_color: change the state of lifx lamps

Description Usage Arguments Value

View source: R/color.R

Description

change the state of lifx lamps

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
lx_color(
  hue = NULL,
  saturation = NULL,
  brightness = NULL,
  kelvin = NULL,
  duration = NULL,
  infrared = NULL,
  color_name = NULL,
  fast = FALSE,
  delta = FALSE,
  selector = "all",
  power = NULL,
  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

duration

in seconds, how long to perform the transition

infrared

infrared brightness (0-1)

color_name

a color name (i.e. "red"), hexadecimal color code (i.e. "#FF0000") or output from lx_color() (in lifx api format (see https://api.developer.lifx.com/docs/colors). If this parameter is used, other parameters may be ignored.

fast

Executes the query fast, without initial state checks and wait for no results. See https://api.developer.lifx.com/docs/set-state

delta

if set to TRUE, color values (hue, saturation, brightness, kelvin, infrared) are added to the lights' current values. Can not be used in combination with 'color_name'

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

power

string - if set to "on", turns the light on, if set to "off" turns it off.

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)


mabafaba/lifx documentation built on June 8, 2020, 3:46 a.m.