{"_id":"5c6500ecc5d11a005d81e9e7","project":"54ebb40d6423300d003672c0","version":{"_id":"55f28172f9f3991900f38a13","project":"54ebb40d6423300d003672c0","__v":2,"createdAt":"2015-09-11T07:23:30.065Z","releaseDate":"2015-09-11T07:23:30.065Z","categories":["55f28172f9f3991900f38a14","55f28172f9f3991900f38a15","55f28172f9f3991900f38a16","55f66acb297b37170058accb"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1"},"category":{"_id":"55f28172f9f3991900f38a16","__v":3,"pages":["55f28173f9f3991900f38a1d","55f28173f9f3991900f38a1e","55f28173f9f3991900f38a1f","55f28173f9f3991900f38a20","55f28173f9f3991900f38a21","55f28173f9f3991900f38a22","55f28173f9f3991900f38a23","55f28173f9f3991900f38a24","55f28173f9f3991900f38a25","55f28173f9f3991900f38a26","55f28173f9f3991900f38a27","55f63d46fe4cce21005c785e","55f65cc16be5ea0d00bbbf4c"],"project":"54ebb40d6423300d003672c0","version":"55f28172f9f3991900f38a13","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-06-17T05:23:31.147Z","from_sync":false,"order":2,"slug":"api-endpoints","title":"API Endpoints"},"user":"57749b725b96cf0e00558ea6","__v":3,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2019-02-14T05:47:24.238Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":"2XX","language":"json","code":"{\n  \"results\": [\n    {\n      \"id\": \"d3b2f2d97452\",\n      \"label\": \"My tile\",\n      \"status\": \"ok\"\n    }\n  ]\n}","name":""}]},"settings":"","examples":{"codes":[{"name":null,"language":"curl","code":"curl -X POST \"https://api.lifx.com/v1/lights/all/effects/flame\" \\\n     -H \"Authorization: Bearer [[app:Token]]\" \\\n     -H \"Content-Type:application/json\"\n     -d '{\"power_on\": true}'"},{"code":"import requests\n\ntoken = \"[[app:Token]]\"\n\nheaders = {\n    \"Authorization\": \"Bearer %s\" % token,\n}\n\ndata = {\n    \"power_on\": True\n}\n\nresponse = requests.post('https://api.lifx.com/v1/lights/all/effects/flame', data=data, headers=headers)","language":"python"}]},"method":"post","auth":"required","params":[{"_id":"5c47d63469cb1d04074725d3","ref":"","in":"path","required":false,"desc":"The [selector](doc:selectors) to limit which devices will run the effect.","default":"","type":"string","name":"selector"},{"_id":"5c47d5fd69cb1d04074725d1","ref":"","in":"body","required":false,"desc":"This controls how quickly the flame runs. It is measured in seconds. A lower number means the animation is faster","default":"5","type":"double","name":"period"},{"_id":"5c64ffec00892c00ecc173ef","ref":"","in":"body","required":false,"desc":"How long the animation lasts for in seconds. Not specifying a duration makes the animation never stop. Specifying 0 makes the animation stop. Note that there is a known bug where the tile remains in the animation once it has completed if duration is nonzero.","default":"infinite","type":"float","name":"duration"},{"_id":"5c47d5fd69cb1d04074725cf","ref":"","in":"body","required":false,"desc":"Switch any selected device that is off to on before performing the effect.","default":"true","type":"boolean","name":"power_on"}],"url":"/lights/:selector/effects/flame"},"isReference":false,"order":9,"body":"Performs a flame effect on the tiles in your selector. Use the parameters to tweak the effect. Note that the brightness of the flame is determined by the brightness of the tile. To change the brightness, use the SetState endpoint.","excerpt":"","slug":"flame-effect","type":"endpoint","title":"Flame Effect"}

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

selector:
string
The [selector](doc:selectors) to limit which devices will run the effect.

Body Params

period:
double5
This controls how quickly the flame runs. It is measured in seconds. A lower number means the animation is faster
duration:
floatinfinite
How long the animation lasts for in seconds. Not specifying a duration makes the animation never stop. Specifying 0 makes the animation stop. Note that there is a known bug where the tile remains in the animation once it has completed if duration is nonzero.
power_on:
booleantrue
Switch any selected device that is off to on before performing the effect.

Examples


Result Format


Documentation

Performs a flame effect on the tiles in your selector. Use the parameters to tweak the effect. Note that the brightness of the flame is determined by the brightness of the tile. To change the brightness, use the SetState endpoint.

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}