Time Input Widget Sunrise Sunset Sync Failed

The following code is assumed to “remember” Time Input Widget settings at hardware reset since last session.

However, after hardware reset the “Sunrise” and “Sunset” flag values are lost. Time values refresh as they should.

// Every time we connect to the cloud...
BLYNK_CONNECTED() {

  //Sync last used Time Input Widget values from cloud:
  Blynk.syncVirtual(V10);
  Blynk.syncVirtual(V11);

}

I guess it depends on what the rest of your code looks like, especially the BLYNK_WRITE(V10) and (V11) functions and how the Sunrise and Sunset flags are defined and manipulated.

Pete.

Thank You @PeteKnight. My mistake was thinking that Blynk Cloud would save the last known Sunset/Sunrise time values and return them with syncVirtual () function call.

The project listing shows that instead of Sunrise/Sunset time values the Blynk Cloud saves only the flag values. This is acceptable design.

So I must recalculate the Sunrise/Sunset time values inside BLYNK_WRITE() functions as you suggested.