mirror of
https://github.com/xoseperez/espurna.git
synced 2026-03-12 11:17:06 +01:00
light: provide correct data to the /ws API
RGB is a #RRGGBB hex string, not a R,G,B Current ltSaveDelay missing from the LIGHTS page
This commit is contained in:
@@ -1689,7 +1689,7 @@ bool _lightWebSocketOnKeyCheck(const char * key, JsonVariant& value) {
|
||||
void _lightWebSocketStatus(JsonObject& root) {
|
||||
if (_light_has_color) {
|
||||
if (_light_use_rgb) {
|
||||
root["rgb"] = lightRgbPayload();
|
||||
root["rgb"] = _lightRgbHexPayload(false);
|
||||
} else {
|
||||
root["hsv"] = lightHsvPayload();
|
||||
}
|
||||
@@ -1721,6 +1721,7 @@ void _lightWebSocketOnConnected(JsonObject& root) {
|
||||
root["useTransitions"] = _light_use_transitions;
|
||||
root["useRGB"] = _light_use_rgb;
|
||||
root["ltSave"] = _light_save;
|
||||
root["ltSaveDelay"] = _light_save_delay;
|
||||
root["ltTime"] = _light_transition_time;
|
||||
root["ltStep"] = _light_transition_step;
|
||||
#if RELAY_SUPPORT
|
||||
|
||||
Reference in New Issue
Block a user