When you use the “Creates a new scene” command in an automation, a new scene is created that memorizes the state of the entities you use in that scene. When, in another automation, you activate that created scene, the entities return to the state memorized in the scene. The problem is that if you restart HA in the meantime, when you activate the scene created before, the entities do not return to the state memorized in the scene.These scenes created in automations should remain permanent.
Scenes created with scene.create are stored in temporary file locations that disappear at reboot.
If you want ones that stick around, create them using the menus and modify contents of the perm ones in your code instead of creating new ones in the code.
*Link to Scenes – My Home Assistant
I don’t know how to do this. Please help me and give me an example.
I use create scenes in automation to store the state of some entities so that later I can activate this scene in another automation and restore the state of those entities, which have changed their state in the meantime.