turn_on optional URL parameters:
brightness: The brightness of the light, from 0 to 255.
r: The red color channel of the light, from 0 to 255.
g: The green color channel of the light, from 0 to 255.
b: The blue color channel of the light, from 0 to 255.
white_value: The white channel of RGBW lights, from 0 to 255.
flash: Flash the color provided by the other properties for a duration in seconds.
transition: Transition to the specified color values in this duration in seconds.
effect: Set an effect for the light.
*color_temp*: Set the color temperature of the light, in mireds.
However, working with this bulb, I found that color mode calls using the "r", "g" and "b" parameters are ignored unless an additional parameter is provided: "color_mode=rgb".
This is not mentioned in the current documentation and should be added.
Steps to reproduce.
Connect an ESPHome light bulb to the local WiFi, and retrieve its IP address from the router.
Note that this turns the light on, and this time it is red.
Conclusion. The "color_mode=rgb" parameter is required, and should therefore be documented as such.
Which version of ESPHome has the issue?
2023.9.1
What type of installation are you using?
pip
Which version of Home Assistant has the issue?
Not using HA
What platform are you using?
ESP8266
Board
Kauf BLF19
Component causing the issue
rest api
Example YAML snippet
No response
Anything in the logs that might be useful for us?
When a call is made without the "color_mode" parameter, the following message is reported in the log:
19:40:15 [I] [light:473]
'Kauf Bulb' - Using color mode RGB for call without color mode.
The problem
The REST API documentation at https://esphome.io/web-api/index.html#light lists the following parameters for a POST call to turn on the light:
However, working with this bulb, I found that color mode calls using the "r", "g" and "b" parameters are ignored unless an additional parameter is provided: "color_mode=rgb".
This is not mentioned in the current documentation and should be added.
Steps to reproduce.
Connect an ESPHome light bulb to the local WiFi, and retrieve its IP address from the router.
Issue the following http calls:
Note that this turns the light on with a warm white color temp.
This turns the light off again.
Note that this turns the light on, but it does not respect the color sent, and instead turns back on warm white.
This turns the light off again.
Note that this turns the light on, and this time it is red.
Conclusion. The "color_mode=rgb" parameter is required, and should therefore be documented as such.
Which version of ESPHome has the issue?
2023.9.1
What type of installation are you using?
pip
Which version of Home Assistant has the issue?
Not using HA
What platform are you using?
ESP8266
Board
Kauf BLF19
Component causing the issue
rest api
Example YAML snippet
No response
Anything in the logs that might be useful for us?