Is it possible to activate the scenes, effects, themes or time planing that are configured in the lifx app by Hass? Or are they saved inside of the app?
Would be great if I could activate the scenes and the other stuff from Hass without writing scripts or automations for all of them.
By the way, has someone some effects, themes or other cool lighting stuff he could share?
Been busy with a full course load this semester and unable to sit down and really churn through what needs to be done, but others seem to have started looking into helping.
Yes, supporting firmware effects would be possible. I am not currently working on the LIFX integration though. Also, I do not have any LIFX Tile so somebody else would have to do the implementation.
Would love to see the Lifx Themes in Hassio, āBlendā theme is awesome!
Is it possible to activate the āThemes Blend / Warmingā using Home assistant?
LIFX has a public and well-documented REST API, which means with a little effort you can trigger themes using a REST template (and then fire from an automation, script, etc). Like you, I wanted to get Morph working so I setup a rest_command with the following in my config (note: be sure to prepend your token with āBearerā followed by the token). Here are the steps:
Go to https://cloud.lifx.com/settings, sign in with your Lifx account and generate a bearer token, youāll use this to authenticate against the API
Place this in your secrets.yaml file (or directly in config, not recommended).
secrets.yaml:
...
lifx_token: Bearer <token you just created>
Go to your configuration.yaml file and add the rest_command config below, feel free to adapt as per the lifx API documentation to suit your needs:
rest_command:
lifx_tiles_morph:
url: https://api.lifx.com/v1/lights/{light_id OR all}/effects/morph
method: POST
headers:
authorization: !secret lifx_token
payload: '{"power_on": true}'
Restart your server to pull in the new config
From here, you can set your LIFX light(s) using the command you just configured as a service, such as from an automation:
@aicarmic, thanks that worked perfectly. To take it a step further, I set up my rest_command to parse a payload provided to it into the request payload.
rest_command:
lifx_effect:
url: https://api.lifx.com/v1/lights/{{ selector or "all" }}/effects/{{ effect or "flame" }}
method: POST
headers:
authorization: !secret lifx_token
content-type: application/json
payload: "{{ (payload | tojson) if payload else '{\"power_on\": true}' }}"
Button in Lovelace
name: Breathe Blue Living Room
tap_action:
action: call-service
service: rest_command.lifx_effect
service_data:
effect: breathe
selector: 'group:Living Room'
payload:
color: blue
cycles: 10
type: button
Using the api docs, it is then is very easy to set up new effects on a dashboard or trigger them from scripts.