From 174720ae51bf23372e8406f6c1f73e099ff51d5e Mon Sep 17 00:00:00 2001 From: Anders Melchiorsen Date: Fri, 12 May 2017 18:19:56 +0200 Subject: [PATCH] Add light.lifx_set_state (#2620) Documentation for a new service call. --- source/_components/light.lifx.markdown | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/source/_components/light.lifx.markdown b/source/_components/light.lifx.markdown index 96a4002d48b..fbf9a22e6e1 100644 --- a/source/_components/light.lifx.markdown +++ b/source/_components/light.lifx.markdown @@ -27,6 +27,22 @@ Configuration variables: - **server** (*Optional*): Your server address. Only needed if using more than one network interface. Omit if you are unsure. +## {% linkable_title Set state %} + +The LIFX bulbs allow a change of color and brightness even when they are turned off. This way you can control the light during the day so its settings are correct when events for turning on are received, for example from motion detectors or external buttons. + +The normal `light.turn_on` call cannot be used for this because it always turns the power on. Thus, LIFX has its own service call that allows color changes without affecting the current power state. + +### {% linkable_title Service `light.lifx_set_state` %} + +Change the light to a new state. + +| Service data attribute | Description | +| ---------------------- | ----------- | +| `entity_id` | String or list of strings that point at `entity_id`s of lights. Else targets all. +| `transition` | Duration (in seconds) for the light to fade to the new state. +| `power` | Turn the light on (`True`) or off (`False`). Leave out to keep the power as it is. +| `...` | Use `color_name`, `brightness` etc. from [`light.turn_on`]({{site_root}}/components/light/#service-lightturn_on) to specify the new state. ## {% linkable_title Light effects %}