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

  //Sync last used Time Input Widget values from cloud:


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.


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.