lx_list_lights: list available lights

Description Usage Arguments Details Value Examples

View source: R/list_lights.R

Description

list available lights

Usage

1
lx_list_lights(selector = "all", token = lx_get_token())

Arguments

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)

Details

each item in the returned list contains (depending on the type of lamp), the following named items:

Value

a list with each item representing one light. Each item itself is a list with all relevant information about the light and it's state

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 
lx_list_lights()

lights <- lx_list_lights(
  lx_selector(location = "kitchen")
)

first_kitchen_light <- lights[[1]]

first_kitchen_light$power
first_kitchen_light$color$hue
first_kitchen_light$color$saturation

first_kitchen_light$group


## End(Not run)

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