Do you want to synchronise the lamp with the app, or the app with the lamp?
To synchronise the lamp with the app then add a
BLYNK_CONNECTED() callback and some code to synchronise the pin that your lamp widget is attached to…
Blynk.syncAll(); // This synchronises all pins, both digital and virtual - or,
Blynl.syncVirtial(vPin); // This will just synchronise the specified virtual pin
To synchronise the app with the lamp then add a
BLYNK_CONNECTED() callback with some different code. This will depend much more on how you’ve written your code, but will look something like this:…
Blynk.virtualWrite(vPin, lampsState); // Write the current lampState to the widget
If this doesn’t make any sense to you then post your code (correctly formatted with triple backticks - ```) and details of which pin your lamp widget is attached to.