Learn R Programming

lifx (version 0.2.0)

lx_toggle: Toggle light

Description

Toggle light

Usage

lx_toggle(duration = 0, selector = "all", token = lx_get_token())

Arguments

duration

in seconds, how long to perform the transition

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)

Examples

Run this code
# NOT RUN {
lx_toggle(duration = 5)
lx_toggle(selector = lx_selector(location = "kitchen"))
# }

Run the code above in your browser using DataLab