File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -318,15 +318,20 @@ void serializeState(JsonObject root)
318318 nl[F (" fade" )] = (nightlightMode > NL_MODE_SET); // deprecated
319319 nl[F (" mode" )] = nightlightMode;
320320 nl[F (" tbri" )] = nightlightTargetBri;
321-
321+ if (nightlightActive) {
322+ nl[F (" rem" )] = (nightlightDelayMs - (millis () - nightlightStartTime)) / 1000 ; // seconds remaining
323+ } else {
324+ nl[F (" rem" )] = -1 ;
325+ }
326+
322327 JsonObject udpn = root.createNestedObject (" udpn" );
323328 udpn[F (" send" )] = notifyDirect;
324329 udpn[F (" recv" )] = receiveNotifications;
325330
326331 root[F (" lor" )] = realtimeOverride;
327332
328333 root[F (" mainseg" )] = strip.getMainSegmentId ();
329-
334+
330335 JsonArray seg = root.createNestedArray (" seg" );
331336 for (byte s = 0 ; s < strip.getMaxSegments (); s++)
332337 {
You can’t perform that action at this time.
0 commit comments