[R/lifx-cloud.R:1:2:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L1) *style:* **Commented code should be removed.**
```r
## SEE Docs: https://api.lifx.com/
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:3:1:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L3) *style:* **Variable or function name should be snake_case.**
```r
BASE <- "https://api.lifx.com"
^~~~
```
[R/lifx-cloud.R:4:1:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L4) *style:* **Variable or function name should be snake_case.**
```r
VERSION <- "v1"
^~~~~~~
```
[R/lifx-cloud.R:7:34:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L7) *style:* **Commas should always have a space after.**
```r
    key <- Sys.getenv("LIFX_PAT",unset = NA)
                                 ^
```
[R/lifx-cloud.R:8:7:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L8) *style:* **Place a space before left parenthesis, except in a function call.**
```r
    if(is.na(key))stop("No key found")
      ^
```
[R/lifx-cloud.R:11:2:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L11) *style:* **Commented code should be removed.**
```r
## limieten stellne: hue:[0-360]
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:13:7:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L13) *style:* **Place a space before left parenthesis, except in a function call.**
```r
    if(hue <0 | hue >360){stop("hue needs to be between 0 and 360")}
      ^
```
[R/lifx-cloud.R:13:12:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L13) *style:* **Put spaces around all infix operators.**
```r
    if(hue <0 | hue >360){stop("hue needs to be between 0 and 360")}
           ^~
```
[R/lifx-cloud.R:13:21:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L13) *style:* **Put spaces around all infix operators.**
```r
    if(hue <0 | hue >360){stop("hue needs to be between 0 and 360")}
                    ^~
```
[R/lifx-cloud.R:13:26:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L13) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
    if(hue <0 | hue >360){stop("hue needs to be between 0 and 360")}
                         ^
```
[R/lifx-cloud.R:13:68:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L13) *style:* **Closing curly-braces should always be on their own line, unless it's followed by an else.**
```r
    if(hue <0 | hue >360){stop("hue needs to be between 0 and 360")}
                                                                   ^
```
[R/lifx-cloud.R:16:2:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L16) *style:* **Commented code should be removed.**
```r
## saturation:[0.0-1.0]
 ^~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:18:7:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L18) *style:* **Place a space before left parenthesis, except in a function call.**
```r
    if(value <0 | value >1){stop("saturation needs to be between 0 and 1")}
      ^
```
[R/lifx-cloud.R:18:14:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L18) *style:* **Put spaces around all infix operators.**
```r
    if(value <0 | value >1){stop("saturation needs to be between 0 and 1")}
             ^~
```
[R/lifx-cloud.R:18:25:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L18) *style:* **Put spaces around all infix operators.**
```r
    if(value <0 | value >1){stop("saturation needs to be between 0 and 1")}
                        ^~
```
[R/lifx-cloud.R:18:28:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L18) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
    if(value <0 | value >1){stop("saturation needs to be between 0 and 1")}
                           ^
```
[R/lifx-cloud.R:18:75:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L18) *style:* **Closing curly-braces should always be on their own line, unless it's followed by an else.**
```r
    if(value <0 | value >1){stop("saturation needs to be between 0 and 1")}
                                                                          ^
```
[R/lifx-cloud.R:21:2:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L21) *style:* **Commented code should be removed.**
```r
## brightness:[0.0-1.0]
 ^~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:23:7:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L23) *style:* **Place a space before left parenthesis, except in a function call.**
```r
    if(value <0 | value >1){stop("brightness needs to be between 0 and 1")}
      ^
```
[R/lifx-cloud.R:23:14:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L23) *style:* **Put spaces around all infix operators.**
```r
    if(value <0 | value >1){stop("brightness needs to be between 0 and 1")}
             ^~
```
[R/lifx-cloud.R:23:25:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L23) *style:* **Put spaces around all infix operators.**
```r
    if(value <0 | value >1){stop("brightness needs to be between 0 and 1")}
                        ^~
```
[R/lifx-cloud.R:23:28:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L23) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
    if(value <0 | value >1){stop("brightness needs to be between 0 and 1")}
                           ^
```
[R/lifx-cloud.R:23:75:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L23) *style:* **Closing curly-braces should always be on their own line, unless it's followed by an else.**
```r
    if(value <0 | value >1){stop("brightness needs to be between 0 and 1")}
                                                                          ^
```
[R/lifx-cloud.R:26:2:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L26) *style:* **Commented code should be removed.**
```r
## kelvin:[2500-9000]  # maar geef boodschap als ook saturation gegeven, slaat
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:28:1:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L28) *style:* **Lines should not be more than 80 characters.**
```r
    if(value <2500 | value >9000){stop("kelvin needs to be between 2500 and 9000")}
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:28:7:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L28) *style:* **Place a space before left parenthesis, except in a function call.**
```r
    if(value <2500 | value >9000){stop("kelvin needs to be between 2500 and 9000")}
      ^
```
[R/lifx-cloud.R:28:14:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L28) *style:* **Put spaces around all infix operators.**
```r
    if(value <2500 | value >9000){stop("kelvin needs to be between 2500 and 9000")}
             ^~
```
[R/lifx-cloud.R:28:28:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L28) *style:* **Put spaces around all infix operators.**
```r
    if(value <2500 | value >9000){stop("kelvin needs to be between 2500 and 9000")}
                           ^~
```
[R/lifx-cloud.R:28:34:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L28) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
    if(value <2500 | value >9000){stop("kelvin needs to be between 2500 and 9000")}
                                 ^
```
[R/lifx-cloud.R:28:83:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L28) *style:* **Closing curly-braces should always be on their own line, unless it's followed by an else.**
```r
    if(value <2500 | value >9000){stop("kelvin needs to be between 2500 and 9000")}
                                                                                ^
```
[R/lifx-cloud.R:33:16:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L33) *style:* **Trailing whitespace is superfluous.**
```r
# except color.
               ^
```
[R/lifx-cloud.R:38:3:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L38) *style:* **Trailing whitespace is superfluous.**
```r
#'
  ^
```
[R/lifx-cloud.R:44:61:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L44) *style:* **Trailing whitespace is superfluous.**
```r
  results <- GET(paste0(BASE, "/", VERSION, "/lights.json"),
                                                            ^
```
[R/lifx-cloud.R:46:5:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L46) *style:* **Place a space before left parenthesis, except in a function call.**
```r
  if(results$status_code != 200)
    ^
```
[R/lifx-cloud.R:53:3:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L53) *style:* **Trailing whitespace is superfluous.**
```r
#'
  ^
```
[R/lifx-cloud.R:55:74:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L55) *style:* **Trailing whitespace is superfluous.**
```r
#' @param selector a string in format '[type]:[value]', where type can be
                                                                         ^
```
[R/lifx-cloud.R:56:73:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L56) *style:* **Trailing whitespace is superfluous.**
```r
#' 'all', 'id', 'label', 'group', 'group_id', 'location', 'location_id',
                                                                        ^
```
[R/lifx-cloud.R:58:34:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L58) *style:* **Trailing whitespace is superfluous.**
```r
#' which needs no value argument.
                                 ^
```
[R/lifx-cloud.R:59:56:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L59) *style:* **Trailing whitespace is superfluous.**
```r
#' @return a list of all lights, status, and properties
                                                       ^
```
[R/lifx-cloud.R:62:67:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L62) *style:* **Trailing whitespace is superfluous.**
```r
  results <- GET(paste0(BASE, "/", VERSION, "/lights/", selector),
                                                                  ^
```
[R/lifx-cloud.R:64:1:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L64) *style:* **Lines should not be more than 80 characters.**
```r
  jsonlite::fromJSON(content(results, as="text",encoding = "utf-8"),simplifyDataFrame = F)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:64:22:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L64) *warning:* **no visible global function definition for ‘content’, Did you mean 'confint'?**
```r
  jsonlite::fromJSON(content(results, as="text",encoding = "utf-8"),simplifyDataFrame = F)
                     ^~~~~~~
```
[R/lifx-cloud.R:64:41:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L64) *style:* **Put spaces around all infix operators.**
```r
  jsonlite::fromJSON(content(results, as="text",encoding = "utf-8"),simplifyDataFrame = F)
                                       ~^~
```
[R/lifx-cloud.R:64:49:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L64) *style:* **Commas should always have a space after.**
```r
  jsonlite::fromJSON(content(results, as="text",encoding = "utf-8"),simplifyDataFrame = F)
                                                ^
```
[R/lifx-cloud.R:64:69:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L64) *style:* **Commas should always have a space after.**
```r
  jsonlite::fromJSON(content(results, as="text",encoding = "utf-8"),simplifyDataFrame = F)
                                                                    ^
```
[R/lifx-cloud.R:68:3:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L68) *style:* **Trailing whitespace is superfluous.**
```r
#'
  ^
```
[R/lifx-cloud.R:74:17:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L74) *warning:* **no visible global function definition for ‘lights’, Did you mean 'weights'?**
```r
  light_list <- lights(selector = selector)
                ^~~~~~
```
[R/lifx-cloud.R:75:21:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L75) *style:* **Trailing whitespace is superfluous.**
```r
  sapply(light_list,
                    ^
```
[R/lifx-cloud.R:78:14:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L78) *style:* **Place a space before left parenthesis, except in a function call.**
```r
           if(light$color[["saturation"]] > 0)
             ^
```
[R/lifx-cloud.R:79:27:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L79) *style:* **Trailing whitespace is superfluous.**
```r
             paste("hsb:",
                          ^
```
[R/lifx-cloud.R:83:23:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L83) *style:* **Put spaces around all infix operators.**
```r
                   sep="")
                     ~^~
```
[R/lifx-cloud.R:84:18:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L84) *style:* **Trailing whitespace is superfluous.**
```r
             else
                 ^
```
[R/lifx-cloud.R:85:32:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L85) *style:* **Trailing whitespace is superfluous.**
```r
               paste("kelvin:",
                               ^
```
[R/lifx-cloud.R:86:46:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L86) *style:* **Trailing whitespace is superfluous.**
```r
                     light$color[["kelvin"]],
                                             ^
```
[R/lifx-cloud.R:88:38:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L88) *style:* **Put spaces around all infix operators.**
```r
                     light$brightness*100, "%",
                                    ~^~
```
[R/lifx-cloud.R:88:48:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L88) *style:* **Trailing whitespace is superfluous.**
```r
                     light$brightness*100, "%",
                                               ^
```
[R/lifx-cloud.R:89:25:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L89) *style:* **Put spaces around all infix operators.**
```r
                     sep="")
                       ~^~
```
[R/lifx-cloud.R:95:3:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L95) *style:* **Trailing whitespace is superfluous.**
```r
#'
  ^
```
[R/lifx-cloud.R:101:1:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L101) *style:* **Lines should not be more than 80 characters.**
```r
  results <- POST(paste0(BASE, "/", VERSION, "/lights/", selector, "/toggle.json"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:101:84:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L101) *style:* **Trailing whitespace is superfluous.**
```r
  results <- POST(paste0(BASE, "/", VERSION, "/lights/", selector, "/toggle.json"),
                                                                                ^
```
[R/lifx-cloud.R:103:22:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L103) *warning:* **no visible global function definition for ‘content’, Did you mean 'confint'?**
```r
  jsonlite::fromJSON(content(results, as="text"))
                     ^~~~~~~
```
[R/lifx-cloud.R:103:41:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L103) *style:* **Put spaces around all infix operators.**
```r
  jsonlite::fromJSON(content(results, as="text"))
                                       ~^~
```
[R/lifx-cloud.R:107:3:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L107) *style:* **Trailing whitespace is superfluous.**
```r
#'
  ^
```
[R/lifx-cloud.R:113:1:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L113) *style:* **Lines should not be more than 80 characters.**
```r
#' @details Not exported because it conflicts with stats::power. see on() and off()
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:116:1:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L116) *style:* **Lines should not be more than 80 characters.**
```r
  results <- PUT(paste0(BASE, "/", VERSION, "/lights/", selector, "/state.json"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:116:82:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L116) *style:* **Trailing whitespace is superfluous.**
```r
  results <- PUT(paste0(BASE, "/", VERSION, "/lights/", selector, "/state.json"),
                                                                                ^
```
[R/lifx-cloud.R:117:34:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L117) *style:* **Trailing whitespace is superfluous.**
```r
      query = list(power = state,
                                 ^
```
[R/lifx-cloud.R:118:40:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L118) *style:* **Trailing whitespace is superfluous.**
```r
                   duration = duration,
                                       ^
```
[R/lifx-cloud.R:120:22:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L120) *warning:* **no visible global function definition for ‘content’, Did you mean 'confint'?**
```r
  jsonlite::fromJSON(content(results, as="text"))
                     ^~~~~~~
```
[R/lifx-cloud.R:120:41:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L120) *style:* **Put spaces around all infix operators.**
```r
  jsonlite::fromJSON(content(results, as="text"))
                                       ~^~
```
[R/lifx-cloud.R:125:3:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L125) *style:* **Trailing whitespace is superfluous.**
```r
#'
  ^
```
[R/lifx-cloud.R:132:10:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L132) *warning:* **possible error in power("off", selector = selector, duration = duration): unused arguments (selector = selector, duration = duration)**
```r
  power("off", selector = selector, duration = duration)
         ^~~
```
[R/lifx-cloud.R:137:3:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L137) *style:* **Trailing whitespace is superfluous.**
```r
#'
  ^
```
[R/lifx-cloud.R:138:19:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L138) *style:* **Trailing whitespace is superfluous.**
```r
#' power lights on
                  ^
```
[R/lifx-cloud.R:144:10:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L144) *warning:* **possible error in power("on", selector = selector, duration = duration): unused arguments (selector = selector, duration = duration)**
```r
  power("on", selector = selector, duration = duration)
         ^~
```
[R/lifx-cloud.R:149:3:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L149) *style:* **Trailing whitespace is superfluous.**
```r
#'
  ^
```
[R/lifx-cloud.R:153:1:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L153) *style:* **Lines should not be more than 80 characters.**
```r
#' @param power_on should the light be powered on if it is off? (FALSE just leaves light off)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:155:1:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L155) *style:* **Lines should not be more than 80 characters.**
```r
#' @details Note that the kelvin temperature ranges from 2700 to 8000. Hue in HSB list is
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:155:90:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L155) *style:* **Trailing whitespace is superfluous.**
```r
#' @details Note that the kelvin temperature ranges from 2700 to 8000. Hue in HSB list is
                                                                                ^
```
[R/lifx-cloud.R:156:1:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L156) *style:* **Lines should not be more than 80 characters.**
```r
#' a number between 0 and 360, whereas saturation and brightness should be between 0 and 1.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:157:3:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L157) *style:* **Trailing whitespace is superfluous.**
```r
#'
  ^
```
[R/lifx-cloud.R:159:1:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L159) *style:* **Lines should not be more than 80 characters.**
```r
#'  color("green", "label:desk")   # deep green, brightness untouched on lights labeled 'desk'
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:162:1:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L162) *style:* **Lines should not be more than 80 characters.**
```r
#'  color("random")                # random hue, maximum saturation, brightness untouched
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:169:1:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L169) *style:* **Lines should not be more than 80 characters.**
```r
  results <- PUT(paste0(BASE, "/", VERSION, "/lights/", selector, "/state.json"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:169:82:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L169) *style:* **Trailing whitespace is superfluous.**
```r
  results <- PUT(paste0(BASE, "/", VERSION, "/lights/", selector, "/state.json"),
                                                                                ^
```
[R/lifx-cloud.R:170:34:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L170) *style:* **Trailing whitespace is superfluous.**
```r
      query = list(color = color,
                                 ^
```
[R/lifx-cloud.R:171:40:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L171) *style:* **Trailing whitespace is superfluous.**
```r
                   duration = duration,
                                       ^
```
[R/lifx-cloud.R:174:22:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L174) *warning:* **no visible global function definition for ‘content’, Did you mean 'confint'?**
```r
  jsonlite::fromJSON(content(results, as="text"))
                     ^~~~~~~
```
[R/lifx-cloud.R:174:41:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L174) *style:* **Put spaces around all infix operators.**
```r
  jsonlite::fromJSON(content(results, as="text"))
                                       ~^~
```
[R/lifx-cloud.R:179:3:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L179) *style:* **Trailing whitespace is superfluous.**
```r
#'
  ^
```
[R/lifx-cloud.R:181:1:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L181) *style:* **Lines should not be more than 80 characters.**
```r
#' @param from_color Same syntax as color, defaults to current color (of first bulb in selection)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:184:1:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L184) *style:* **Lines should not be more than 80 characters.**
```r
#' @param persist should the color persist after the effect? default is FALSE (returns to original color)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:191:65:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L191) *style:* **Trailing whitespace is superfluous.**
```r
breathe <- function(color, from_color = current_color(selector),
                                                                ^
```
[R/lifx-cloud.R:194:34:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L194) *style:* **Trailing whitespace is superfluous.**
```r
  settings <- list(color = color,
                                 ^
```
[R/lifx-cloud.R:202:1:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L202) *style:* **Lines should not be more than 80 characters.**
```r
  results <- POST(paste0(BASE, "/", VERSION, "/lights/", selector, "/effects/breathe"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:204:22:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L204) *warning:* **no visible global function definition for ‘content’, Did you mean 'confint'?**
```r
  jsonlite::fromJSON(content(results, as="text"))
                     ^~~~~~~
```
[R/lifx-cloud.R:204:41:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L204) *style:* **Put spaces around all infix operators.**
```r
  jsonlite::fromJSON(content(results, as="text"))
                                       ~^~
```
[R/lifx-cloud.R:208:3:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L208) *style:* **Trailing whitespace is superfluous.**
```r
#'
  ^
```
[R/lifx-cloud.R:211:1:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L211) *style:* **Lines should not be more than 80 characters.**
```r
#' @param duty_cycle Ratio of the period where color is active. Only used for pulse. Defaults to 0.5. Range: 0-1
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:214:68:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L214) *style:* **Trailing whitespace is superfluous.**
```r
pulse <- function(color, from_color = current_color(selector)[[1]],
                                                                   ^
```
[R/lifx-cloud.R:217:34:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L217) *style:* **Trailing whitespace is superfluous.**
```r
  settings <- list(color = color,
                                 ^
```
[R/lifx-cloud.R:225:1:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L225) *style:* **Lines should not be more than 80 characters.**
```r
  results <- POST(paste0(BASE, "/", VERSION, "/lights/", selector, "/effects/pulse.json"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:227:22:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L227) *warning:* **no visible global function definition for ‘content’, Did you mean 'confint'?**
```r
  jsonlite::fromJSON(content(results, as="text"))
                     ^~~~~~~
```
[R/lifx-cloud.R:227:41:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L227) *style:* **Put spaces around all infix operators.**
```r
  jsonlite::fromJSON(content(results, as="text"))
                                       ~^~
```
[R/lifx-cloud.R:231:3:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L231) *style:* **Trailing whitespace is superfluous.**
```r
#'
  ^
```
[R/lifx-cloud.R:238:71:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L238) *style:* **Trailing whitespace is superfluous.**
```r
  PUT(paste0(BASE, "/", VERSION, "/lights/", selector, "/label.json"),
                                                                      ^
```
[R/lifx-cloud.R:239:34:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L239) *style:* **Trailing whitespace is superfluous.**
```r
      query = list(label = label,
                                 ^
```
[R/lifx-cloud.R:244:3:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L244) *style:* **Trailing whitespace is superfluous.**
```r
#'
  ^
```
[R/lifx-cloud.R:252:1:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L252) *style:* **Lines should not be more than 80 characters.**
```r
  results <- PUT(paste0(BASE, "/", VERSION, "/scenes/scene_id:", scene_id, "/activate.json"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:252:94:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L252) *style:* **Trailing whitespace is superfluous.**
```r
  results <- PUT(paste0(BASE, "/", VERSION, "/scenes/scene_id:", scene_id, "/activate.json"),
                                                                                ^
```
[R/lifx-cloud.R:253:34:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L253) *style:* **Trailing whitespace is superfluous.**
```r
      query = list(state = state,
                                 ^
```
[R/lifx-cloud.R:254:40:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L254) *style:* **Trailing whitespace is superfluous.**
```r
                   duration = duration,
                                       ^
```
[R/lifx-cloud.R:256:22:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L256) *warning:* **no visible global function definition for ‘content’, Did you mean 'confint'?**
```r
  jsonlite::fromJSON(content(results, as="text"))
                     ^~~~~~~
```
[R/lifx-cloud.R:256:41:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L256) *style:* **Put spaces around all infix operators.**
```r
  jsonlite::fromJSON(content(results, as="text"))
                                       ~^~
```
[R/lifx-cloud.R:260:3:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L260) *style:* **Trailing whitespace is superfluous.**
```r
#'
  ^
```
[R/lifx-cloud.R:266:24:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L266) *warning:* **no visible global function definition for ‘content’, Did you mean 'confint'?**
```r
    jsonlite::fromJSON(content(results, as="text"))
                       ^~~~~~~
```
[R/lifx-cloud.R:266:43:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L266) *style:* **Put spaces around all infix operators.**
```r
    jsonlite::fromJSON(content(results, as="text"))
                                         ~^~
```
[R/lifx-cloud.R:275:44:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L275) *style:* **Trailing whitespace is superfluous.**
```r
#' @return hsbk information for the string.
                                           ^
```
[R/lifx-cloud.R:278:55:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L278) *style:* **Trailing whitespace is superfluous.**
```r
  results <- GET(paste0(BASE, "/", VERSION, "/color"),
                                                      ^
```
[R/lifx-cloud.R:281:22:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L281) *warning:* **no visible global function definition for ‘content’, Did you mean 'confint'?**
```r
  jsonlite::fromJSON(content(results, as="text"))
                     ^~~~~~~
```
[R/lifx-cloud.R:281:41:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L281) *style:* **Put spaces around all infix operators.**
```r
  jsonlite::fromJSON(content(results, as="text"))
                                       ~^~
```
[R/lifx-cloud.R:285:3:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L285) *style:* **Trailing whitespace is superfluous.**
```r
#'
  ^
```
[R/lifx-cloud.R:287:1:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L287) *style:* **Lines should not be more than 80 characters.**
```r
#' @param power either on or off, defaults to on, makes not sense to shut the light off and change the color
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:293:66:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L293) *style:* **Trailing whitespace is superfluous.**
```r
set_state <- function(selector ="all", power = "on", color= NULL,
                                                                 ^
```
[R/lifx-cloud.R:296:7:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L296) *style:* **Place a space before left parenthesis, except in a function call.**
```r
    if(!is.null(brightness)){brightness <- check_brightness(brightness)}
      ^
```
[R/lifx-cloud.R:296:29:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L296) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
    if(!is.null(brightness)){brightness <- check_brightness(brightness)}
                            ^
```
[R/lifx-cloud.R:296:44:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L296) *warning:* **no visible global function definition for ‘check_brightness’**
```r
    if(!is.null(brightness)){brightness <- check_brightness(brightness)}
                                           ^~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:296:72:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L296) *style:* **Closing curly-braces should always be on their own line, unless it's followed by an else.**
```r
    if(!is.null(brightness)){brightness <- check_brightness(brightness)}
                                                                       ^
```
[R/lifx-cloud.R:297:7:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L297) *style:* **Place a space before left parenthesis, except in a function call.**
```r
    if(!is.null(saturation)){brightness <- check_saturation(saturation)}
      ^
```
[R/lifx-cloud.R:297:29:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L297) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
    if(!is.null(saturation)){brightness <- check_saturation(saturation)}
                            ^
```
[R/lifx-cloud.R:297:44:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L297) *warning:* **no visible global function definition for ‘check_saturation’**
```r
    if(!is.null(saturation)){brightness <- check_saturation(saturation)}
                                           ^~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:297:72:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L297) *style:* **Closing curly-braces should always be on their own line, unless it's followed by an else.**
```r
    if(!is.null(saturation)){brightness <- check_saturation(saturation)}
                                                                       ^
```
[R/lifx-cloud.R:298:1:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L298) *style:* **Lines should not be more than 80 characters.**
```r
    #if(grepl("hue", color)){} # extract hue and check for hue:number and check hue.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:298:6:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L298) *style:* **Commented code should be removed.**
```r
    #if(grepl("hue", color)){} # extract hue and check for hue:number and check hue.
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:299:1:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L299) *style:* **Lines should not be more than 80 characters.**
```r
    result <- PUT(paste0(BASE, "/", VERSION, "/lights/", selector, "/state.json"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:299:83:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L299) *style:* **Trailing whitespace is superfluous.**
```r
    result <- PUT(paste0(BASE, "/", VERSION, "/lights/", selector, "/state.json"),
                                                                                ^
```
[R/lifx-cloud.R:301:37:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L301) *style:* **Put spaces around all infix operators.**
```r
                               color= color,
                                   ~^
```
[R/lifx-cloud.R:304:1:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L304) *style:* **Lines should not be more than 80 characters.**
```r
                               saturation = saturation, # doesn't work. because needs to be in color.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:309:1:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L309) *style:* **Trailing blank lines are superfluous.**
```r

^
```
[R/lifx-cloud.R:310:1:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-cloud.R#L310) *style:* **Trailing blank lines are superfluous.**
```r

^
```
[R/lifx-server.R:1:1:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-server.R#L1) *style:* **Lines should not be more than 80 characters.**
```r
# ## These functions are designed to work with a local server only, which must be running separately
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:2:1:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-server.R#L2) *style:* **Lines should not be more than 80 characters.**
```r
# ## These methods are depricated at this time, see lifx-cloud.R functions instead.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:2:84:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-server.R#L2) *style:* **Trailing whitespace is superfluous.**
```r
# ## These methods are depricated at this time, see lifx-cloud.R functions instead.
                                                                                ^
```
[R/lifx-server.R:3:2:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-server.R#L3) *style:* **Trailing whitespace is superfluous.**
```r
#
 ^
```
[R/lifx-server.R:5:5:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-server.R#L5) *style:* **Commented code should be removed.**
```r
#   results <- GET("http://localhost:56780/lights.json")
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:7:7:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-server.R#L7) *style:* **Commented code should be removed.**
```r
#     message("LIFX server could not be reached")
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:9:7:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-server.R#L9) *style:* **Commented code should be removed.**
```r
#     message("ping! LIFX server is active.")
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:11:2:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-server.R#L11) *style:* **Trailing whitespace is superfluous.**
```r
#
 ^
```
[R/lifx-server.R:13:5:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-server.R#L13) *style:* **Commented code should be removed.**
```r
#   results <- GET(paste0("http://localhost:56780/lights/", selector))
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:14:5:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-server.R#L14) *style:* **Commented code should be removed.**
```r
#   dat <- RJSONIO::fromJSON(content(results, as="text"))
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:16:2:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-server.R#L16) *style:* **Trailing whitespace is superfluous.**
```r
#
 ^
```
[R/lifx-server.R:17:2:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-server.R#L17) *style:* **Trailing whitespace is superfluous.**
```r
#
 ^
```
[R/lifx-server.R:19:5:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-server.R#L19) *style:* **Commented code should be removed.**
```r
#   results <- PUT(paste0("http://localhost:56780/lights/", selector, "/on"))
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:21:2:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-server.R#L21) *style:* **Trailing whitespace is superfluous.**
```r
#
 ^
```
[R/lifx-server.R:23:5:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-server.R#L23) *style:* **Commented code should be removed.**
```r
#   results <- PUT(paste0("http://localhost:56780/lights/", selector, "/off"))
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:25:2:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-server.R#L25) *style:* **Trailing whitespace is superfluous.**
```r
#
 ^
```
[R/lifx-server.R:26:2:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-server.R#L26) *style:* **Trailing whitespace is superfluous.**
```r
#
 ^
```
[R/lifx-server.R:28:1:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-server.R#L28) *style:* **Lines should not be more than 80 characters.**
```r
#   results <- PUT(paste0("http://localhost:56780/lights/", selector, "/toggle"))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:28:5:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-server.R#L28) *style:* **Commented code should be removed.**
```r
#   results <- PUT(paste0("http://localhost:56780/lights/", selector, "/toggle"))
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:30:2:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-server.R#L30) *style:* **Trailing whitespace is superfluous.**
```r
#
 ^
```
[R/lifx-server.R:31:1:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-server.R#L31) *style:* **Lines should not be more than 80 characters.**
```r
# server_color <- function(selector="all", hue, saturation=1, brightness=1, duration=1){
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:32:1:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-server.R#L32) *style:* **Lines should not be more than 80 characters.**
```r
#   settings <- RJSONIO::toJSON(list(hue=hue, saturation=saturation, brightness=brightness, duration=duration))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:32:5:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-server.R#L32) *style:* **Commented code should be removed.**
```r
#   settings <- RJSONIO::toJSON(list(hue=hue, saturation=saturation, brightness=brightness, duration=duration))
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:33:1:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-server.R#L33) *style:* **Lines should not be more than 80 characters.**
```r
#   results <- PUT(paste0("http://localhost:56780/lights/", selector, "/color"), body=settings, encode="json")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:33:5:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-server.R#L33) *style:* **Commented code should be removed.**
```r
#   results <- PUT(paste0("http://localhost:56780/lights/", selector, "/color"), body=settings, encode="json")
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:35:2:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-server.R#L35) *style:* **Trailing whitespace is superfluous.**
```r
#
 ^
```
[R/lifx-server.R:36:3:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-server.R#L36) *style:* **Commented code should be removed.**
```r
# # Briefly set light(s) to green, then restore previous setting
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:39:4:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-server.R#L39) *style:* **Trailing whitespace is superfluous.**
```r
# #
   ^
```
[R/lifx-server.R:41:5:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-server.R#L41) *style:* **Commented code should be removed.**
```r
#   current <- server_status(selector)
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:42:1:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-server.R#L42) *style:* **Lines should not be more than 80 characters.**
```r
#   server_color(selector, hue=120, saturation=1, brightness=1, duration=0.1) # duration is speed of change
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:42:5:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-server.R#L42) *style:* **Commented code should be removed.**
```r
#   server_color(selector, hue=120, saturation=1, brightness=1, duration=0.1) # duration is speed of change
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:44:7:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-server.R#L44) *style:* **Commented code should be removed.**
```r
#     Sys.sleep(duration)
      ^~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:46:29:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-server.R#L46) *style:* **Trailing whitespace is superfluous.**
```r
#     server_color(selector,
                            ^
```
[R/lifx-server.R:47:47:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-server.R#L47) *style:* **Trailing whitespace is superfluous.**
```r
#           hue = current[[1]]$color[["hue"]],
                                              ^
```
[R/lifx-server.R:53:2:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-server.R#L53) *style:* **Trailing whitespace is superfluous.**
```r
#
 ^
```
[R/lifx-server.R:54:3:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-server.R#L54) *style:* **Commented code should be removed.**
```r
# # Briefly set light(s) to red
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:57:4:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-server.R#L57) *style:* **Trailing whitespace is superfluous.**
```r
# #
   ^
```
[R/lifx-server.R:59:5:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-server.R#L59) *style:* **Commented code should be removed.**
```r
#   current <- server_status(selector)
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:60:1:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-server.R#L60) *style:* **Lines should not be more than 80 characters.**
```r
#   server_color(selector, hue=1, saturation=1, brightness=1, duration=0.1) # duration is speed of change
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:60:5:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-server.R#L60) *style:* **Commented code should be removed.**
```r
#   server_color(selector, hue=1, saturation=1, brightness=1, duration=0.1) # duration is speed of change
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:62:7:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-server.R#L62) *style:* **Commented code should be removed.**
```r
#     Sys.sleep(duration)
      ^~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:64:29:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-server.R#L64) *style:* **Trailing whitespace is superfluous.**
```r
#     server_color(selector,
                            ^
```
[R/lifx-server.R:65:47:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-server.R#L65) *style:* **Trailing whitespace is superfluous.**
```r
#           hue = current[[1]]$color[["hue"]],
                                              ^
```
[R/lifx-server.R:71:2:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-server.R#L71) *style:* **Trailing whitespace is superfluous.**
```r
#
 ^
```
[R/lifx-server.R:72:2:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/R/lifx-server.R#L72) *style:* **Trailing whitespace is superfluous.**
```r
#
 ^
```
[tests/testthat/test_inputs.R:8:1:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/tests/testthat/test_inputs.R#L8) *style:* **Lines should not be more than 80 characters.**
```r
    expect_error(check_saturation(1.1), "saturation needs to be between 0 and 1")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[tests/testthat/test_inputs.R:9:1:](https://github.com/RMHogervorst/lifxr/blob/9e3c0f262ae657c6db4ef728f6b7c98d4a0251dd/tests/testthat/test_inputs.R#L9) *style:* **Lines should not be more than 80 characters.**
```r
    expect_error(check_saturation(-0.5), "saturation needs to be between 0 and 1")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```


Adding the correct <span>s to the .kepub.epub (like Kobo Store does) fixes it so you can add bookmarks and annotations. There exist (python) tools to convert .epub to .kepub.epub. Would love an official command line script to do this though!


@Treeston does https://github.com/TrinityCore/TrinityCore/pull/16089#issuecomment-166921517 have anything to do with this commit ?