Save settings at start of script, and reinstate at end

I am trying to write a script to

  1. Read the states of the zone valves for the heating system
  2. Close all valves
  3. Open them one at a time for a few minutes each
  4. Reinstate the previous settings

I have 1-3 but I don’t understand how to achieve 4?

Use this method to store the state of your valves:

https://www.home-assistant.io/integrations/scene/#creating-scenes-on-the-fly

Do your actions, then restore the scene you created.

1 Like

I’ve implemented as per your recommendation and everything is working. Thank you for your help!

1 Like