R/toggle.R

Defines functions lx_toggle

Documented in lx_toggle

#' Toggle light
#' @template param_duration
#' @template param_selector
#' @template param_token
#' @examples
#' \dontrun{
#' lx_toggle(duration = 5)
#' lx_toggle(selector = lx_selector(location = "kitchen"))
#' }
#' @export
lx_toggle <- function(duration = 0, selector = "all", token = lx_get_token()) {
    lx_POST(selector, endpoint = "toggle", token = token, duration = duration)
}

Try the lifx package in your browser

Any scripts or data that you put into this service are public.

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