Set state (power+color) LAN API

The HTTP API has a way to change a bulb’s power and color at the same time. The LAN API however does not appear to have a documented way to do this.

The iOS app also appears to be setting the power and color in individually when setting scenes. This can cause a flash of incorrect colour when activating a scene.

Here’s how to reproduce the behaviour:

  1. Define a scene with a relatively low brightness (e.g. 10-20%).
  2. Set the bulb to be 100% bright
  3. Turn off the bulb
  4. Activate the scene.

The bulb will turn on with the previous 100% bright state and then transition to the darker desired scene state.

Can we have a documented LAN API for setting the entire state (power and color) with a transition duration? It would be nice if the app was updated to use this API too.

1 Like

I found a workaround:

if current power == desired power
  set color with duration
else if desired power == off
  set power with desired duration
  set color with 0 duration
  set power with desired duration