Saving status in an automation

You can use the scene.create service to save the light’s state. Here is an example using this technique with a climate device. Post your automation and we can point you in the direction of how to set it up for your devices and situation.