Learn R Programming

lifx (version 0.2.0)

lx_selector: select lights

Description

use this function to select lights that you want to communicate with

Usage

lx_selector(
  id = NULL,
  label = NULL,
  group_id = NULL,
  group = NULL,
  location_id = NULL,
  location = NULL,
  zones = NULL
)

Arguments

id

the id of the lamp(s) to select

label

the label of the lamp(s) to select

group_id

the group_id of the lamp(s) to select

group

the group of the lamp(s) to select

location_id

the location_id of the lamp(s) to select

location

the location of the lamp(s) to select

zones

the zones of the lamp(s) to select

Value

a character string in the format expected by the 'LIFX' API for selectors. It has it's own class and printing style, but a regular character string can be used just as well.

Details

this creates strings to select lamps in the format that the 'LIFX' api expects (see https://api.developer.lifx.com/docs/selectors). This function is intended to be used to create a 'selector' that is then passed to a function that changes the state of the lamps.

Examples

Run this code
# NOT RUN {
lx_selector(id = '1234')
lx_selector(label = "my_light")
lx_selector(location = 'kitchen', zone = 3)
lx_selector(location = 'kitchen', group = 'ceiling')
# }

Run the code above in your browser using DataLab