Browse Source

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
pull/2471/head
Maxim Prokhorov 2 years ago
parent
commit
527f911ffb
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      code/espurna/light.cpp

+ 2
- 1
code/espurna/light.cpp View File

@ -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


Loading…
Cancel
Save