How to turn lights back on?

Hello! I would like to turn off all lights (group) and after a delay turn back on that lights, which were actually on before my script working.

So I have 5 lights in group, typically 2-3 of them would be on. How can I do that?

If you are running 0.103, you can save the state as a scene, and restore it later.

Thank you, found this example:

  - service: scene.create
    data:
      scene_id: before
      snapshot_entities:
      - climate.ecobee
      - light.ceiling_lights

That worked as it should, nice!