Description Usage Arguments Details Value Examples
list available lights
1 | lx_list_lights(selector = "all", token = lx_get_token())
|
selector |
'LIFX' api "selector" such as "all", "id:12345", or "location:kitchen". Can be created with |
token |
API token (see ?lx_save_token). If left empty, the token is retrieved from the environmental variable if available. (see |
each item in the returned list contains (depending on the type of lamp), the following named items:
Reachability: connected, last_seen, seconds_since_seen
Light identifiers / selectors: id, uuid, label, group, location
Status: power, color, brightness, effect
Hardware information: product
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
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.