Currently scenes created with scene.create are discarded after a restart. Because of that they can often not be reliably used like described in the documentation, e.g. in order to save the current state of some devices in order to recall this state later again. If for some reason HA has to be restarted in between or the configuration reloaded this will not work.
I would therefore suggest to treat scenes created with scene.create like scenes create via the UI. I see no disadvantage in persisting and not deleting them. scene.create already overrides a scene if it exists. Optionally a scene.delete service could be implemented although this might be useful in only rare cases.
This feature could then also be used for integrations which are not able by themselves to persist the state of entities over a restart.
This would be helpful in many situations, for example saving the state of multiple lights when they are turned off after a timeout to re-enable them if motion is sensed within a limited period of time. This allows emulating the typical behavior of motion sensing light switches across multiple lights.
same here. I use scene.create for preserving the state of my light after switching them off and on again via an automation based on motion detection.
Does anyone knows a workaround to preserve this scene over a reboot? Via script maybe?
I second this.
I use scene snapshots for adjusting some temperatures in the house based on the current hourly price of electricity.
If I restart HA at the wrong time, all my set temperatures have to be adjusted.